This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC/RFA] new gdbarch method: NAME_OF_MALLOC


Following the disussion around the fact that the name of the function
used to allocate some memory in the inferior is hard-coded to "malloc"
(http://sources.redhat.com/ml/gdb-patches/2002-09/msg00079.html),
here is a proposed addition to the architecture vector.

Is it the right thing to do to handle the interix case where the
malloc function should be "_malloc"? Is "NAME_OF_MALLOC" ok, or would
we prefer a different name?

Also, I did not find much documentation on each field for the line I
added in gdbarch.sh. So I kind of reversed engineered it by reading
the script code. So if you find anything I missed, this might explain
it...

2002-09-12  Joel Brobecker  <brobecker@gnat.com>

        * 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.

Ok to apply?

Thanks,
-- 
Joel

Attachment: NAME_OF_MALLOC.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]