2007-06-09 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Sat, 9 Jun 2007 14:12:52 +0000 (14:12 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Sat, 9 Jun 2007 14:12:52 +0000 (14:12 +0000)
* gdbarch.sh (NAME_OF_MALLOC): Replace by gdbarch_name_of_malloc.
* valops.c (value_allocate_space_in_inferior): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/ChangeLog
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/valops.c

index 564a07a93508387141fd1d3ed20da1c12011fcee..99a1922c2319dc49194ebffe5339412f078617f6 100644 (file)
@@ -1,3 +1,9 @@
+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
index ef92a7e31d02f55c27c2e215641794998f2edd9c..af1488b03de10a7724eae3d83c55708441baae55 100644 (file)
@@ -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));
index 18e92f8706765aae7f98c704da3721f5dbbfd793..81c4f2c45c1243f0738d7acda359ea3b4e43406b 100644 (file)
@@ -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);
index 1fc3f23e3766f63d792890f7f73d9b2494ddfc14..21a48d7489935d19ba8b87ed5b93acca2ad9a0f6 100755 (executable)
@@ -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
index d32bb0273a4face552dbda8375fe4a4e5ed207df..8cbda262dac4a6e84570b178a84100159c77fc73 100644 (file)
@@ -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);