diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-02-02 05:46:14 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-02-02 05:46:14 +0000 |
commit | 2a81fc667153ee44d05d28acb5160083f81583b5 (patch) | |
tree | 67bf7faade96b004993d14aba6dabe1ae7e5728a /gdb/d10v-tdep.c | |
parent | 3fe1dcb3daac0e83e17b0b47054eb9f223e0a109 (diff) | |
download | gdb-2a81fc667153ee44d05d28acb5160083f81583b5.tar.gz |
2003-02-02 Andrew Cagney <ac131313@redhat.com>
* mips-nat.c (zerobuf): Delete.
(fetch_inferior_registers): Alloc local zerobuf.
(fetch_core_registers): Alloc local zerobuf.
* d10v-tdep.c (show_regs): Don't allocate a dynamic array using
MAX_REGISTER_RAW_SIZE or MAX_REGISTER_VIRTUAL_SIZE.
* thread-db.c (thread_db_store_registers): Ditto.
* sh-tdep.c (sh_do_register): Ditto.
* rom68k-rom.c (rom68k_supply_one_register): Ditto.
* remote-sim.c (gdbsim_store_register): Ditto.
* remote-mips.c (mips_wait, mips_fetch_registers): Ditto.
* remote-e7000.c (fetch_regs_from_dump): Ditto.
* monitor.c (monitor_supply_register): Ditto.
* mipsv4-nat.c (supply_gregset, supply_fpregset): Ditto.
* mips-nat.c (fetch_inferior_registers): Ditto.
* m68klinux-nat.c (fetch_register): Ditto.
* lynx-nat.c (fetch_inferior_registers): Ditto.
(fetch_inferior_registers): Ditto.
* irix4-nat.c (supply_gregset, supply_fpregset): Ditto.
* hpux-thread.c (hpux_thread_fetch_registers): Ditto.
(hpux_thread_store_registers): Ditto.
* hppah-nat.c (fetch_register): Ditto.
* hppab-nat.c (fetch_register): Ditto.
* hppa-tdep.c (pa_register_look_aside): Ditto.
(pa_print_fp_reg, pa_strcat_fp_reg): Ditto.
* dve3900-rom.c (fetch_bitmapped_register): Ditto.
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r-- | gdb/d10v-tdep.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index a627645da9b..4cd3c6300f3 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -864,17 +864,19 @@ show_regs (char *args, int from_tty) printf_filtered ("\n"); } printf_filtered ("A0-A%d", NR_A_REGS - 1); - for (a = A0_REGNUM; a < A0_REGNUM + NR_A_REGS; a++) - { - char num[MAX_REGISTER_RAW_SIZE]; - int i; - printf_filtered (" "); - deprecated_read_register_gen (a, (char *) &num); - for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++) - { - printf_filtered ("%02x", (num[i] & 0xff)); - } - } + { + char *num = alloca (max_register_size (current_gdbarch)); + for (a = A0_REGNUM; a < A0_REGNUM + NR_A_REGS; a++) + { + int i; + printf_filtered (" "); + deprecated_read_register_gen (a, (char *) &num); + for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++) + { + printf_filtered ("%02x", (num[i] & 0xff)); + } + } + } printf_filtered ("\n"); } |