summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2002-09-13 00:38:48 +0000
committerJoel Brobecker <brobecker@gnat.com>2002-09-13 00:38:48 +0000
commit5720643ce87e3763cdf5075d5a8c18a9af0663a3 (patch)
treedae524668a500385708a6c2a107a040dd619cdb2 /gdb/gdbarch.h
parent3bada2a2df47a36a9c44e1cc50669124af7f6370 (diff)
downloadbinutils-gdb-5720643ce87e3763cdf5075d5a8c18a9af0663a3.tar.gz
* gdbarch.sh (NAME_OF_MALLOC): New variable in the architecture
vector. Will be useful for Interix. * gdbarch.h, gdbarch.c: Regenerate. * valops.c (value_allocate_space_in_inferior): Replace hard-coded name of the malloc function by NAME_OF_MALLOC.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 5976f469ec4..246b4da53fa 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -2207,7 +2207,7 @@ extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_
#endif
#endif
-/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
+/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
ADDR_BITS_REMOVE. */
/* Default (function) for non- multi-arch platforms. */
@@ -2532,6 +2532,22 @@ extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdba
#endif
#endif
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
+#define NAME_OF_MALLOC ("malloc")
+#endif
+
+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 (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
+#error "Non multi-arch definition of NAME_OF_MALLOC"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NAME_OF_MALLOC)
+#define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
+#endif
+#endif
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);