diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-09 14:12:52 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-09 14:12:52 +0000 |
commit | aea8766f8c5e652d50f4a0515f9f6dfb56176617 (patch) | |
tree | e12aee8c9b34bd3c5ea31199ab25df73572b2692 | |
parent | 8da95a3048cad9615e407674f8da4e997eb8752f (diff) | |
download | gdb-aea8766f8c5e652d50f4a0515f9f6dfb56176617.zip gdb-aea8766f8c5e652d50f4a0515f9f6dfb56176617.tar.gz gdb-aea8766f8c5e652d50f4a0515f9f6dfb56176617.tar.bz2 |
2007-06-09 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (NAME_OF_MALLOC): Replace by gdbarch_name_of_malloc.
* valops.c (value_allocate_space_in_inferior): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbarch.c | 7 | ||||
-rw-r--r-- | gdb/gdbarch.h | 6 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/valops.c | 3 |
5 files changed, 10 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 564a07a..99a1922 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2007-06-09 Markus Deuling <deuling@de.ibm.com> + * gdbarch.sh (NAME_OF_MALLOC): Replace by gdbarch_name_of_malloc. + * valops.c (value_allocate_space_in_inferior): Likewise. + * gdbarch.c, gdbarch.h: Regenerate. + +2007-06-09 Markus Deuling <deuling@de.ibm.com> + * gdbarch.sh (MEMORY_INSERT_BREAKPOINT): Replace by gdbarch_memory_insert_breakpoint. * mem-break.c (memory_insert_breakpoint): Likewise. diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index ef92a7e..af1488b 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -1035,14 +1035,9 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: memory_remove_breakpoint = <0x%lx>\n", (long) current_gdbarch->memory_remove_breakpoint); -#ifdef NAME_OF_MALLOC - fprintf_unfiltered (file, - "gdbarch_dump: NAME_OF_MALLOC # %s\n", - XSTRING (NAME_OF_MALLOC)); -#endif fprintf_unfiltered (file, "gdbarch_dump: name_of_malloc = %s\n", - NAME_OF_MALLOC); + current_gdbarch->name_of_malloc); fprintf_unfiltered (file, "gdbarch_dump: num_pseudo_regs = %s\n", paddr_d (current_gdbarch->num_pseudo_regs)); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 18e92f8..81c4f2c 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -993,12 +993,6 @@ extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdba extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch); extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc); -#if !defined (GDB_TM_FILE) && defined (NAME_OF_MALLOC) -#error "Non multi-arch definition of NAME_OF_MALLOC" -#endif -#if !defined (NAME_OF_MALLOC) -#define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch)) -#endif extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch); extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 1fc3f23..21a48d7 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -652,7 +652,7 @@ m::int:in_function_epilogue_p:CORE_ADDR addr:addr:0:generic_in_function_epilogue m::char *:construct_inferior_arguments:int argc, char **argv:argc, argv::construct_inferior_arguments::0 f::void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym::default_elf_make_msymbol_special::0 f::void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym::default_coff_make_msymbol_special::0 -v:=:const char *:name_of_malloc:::"malloc":"malloc"::0:NAME_OF_MALLOC +v::const char *:name_of_malloc:::"malloc":"malloc"::0:current_gdbarch->name_of_malloc v::int:cannot_step_breakpoint:::0:0::0 v::int:have_nonsteppable_watchpoint:::0:0::0 F::int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class diff --git a/gdb/valops.c b/gdb/valops.c index d32bb02..8cbda26 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -182,7 +182,8 @@ struct value * value_allocate_space_in_inferior (int len) { struct value *blocklen; - struct value *val = find_function_in_inferior (NAME_OF_MALLOC); + struct value *val = find_function_in_inferior + (gdbarch_name_of_malloc (current_gdbarch)); blocklen = value_from_longest (builtin_type_int, (LONGEST) len); val = call_function_by_hand (val, 1, &blocklen); |