diff options
author | Joel Brobecker <brobecker@gnat.com> | 2002-09-13 00:38:48 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2002-09-13 00:38:48 +0000 |
commit | 5720643ce87e3763cdf5075d5a8c18a9af0663a3 (patch) | |
tree | dae524668a500385708a6c2a107a040dd619cdb2 /gdb/gdbarch.h | |
parent | 3bada2a2df47a36a9c44e1cc50669124af7f6370 (diff) | |
download | binutils-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.h | 18 |
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); |