* 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.
This commit is contained in:
Joel Brobecker
2002-09-13 00:38:48 +00:00
parent 3bada2a2df
commit 5720643ce8
5 changed files with 57 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ struct value *
value_allocate_space_in_inferior (int len)
{
struct value *blocklen;
struct value *val = find_function_in_inferior ("malloc");
struct value *val = find_function_in_inferior (NAME_OF_MALLOC);
blocklen = value_from_longest (builtin_type_int, (LONGEST) len);
val = call_function_by_hand (val, 1, &blocklen);