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]

Re: New target method returning the name of the malloc function?


On Sep 6,  9:17am, Pierre Muller wrote:


>May I suggest a new architecture method called for instance
>NAME_OF_MALLOC or MALLOC_FUNCTION_NAME? The default would be to return
>"malloc", but we could then change it to "_malloc" for the interix
>target.

That would be great !
Because Pascal also does not define malloc...
How does pascal allocate [raw] memory?

This would suggest that something other than a target dependent method
is needed.  (It seems to me that it's both target and language dependent.)
(Ah, the old ``which target'' problem --- target architecture, target os, target abi, target inferior, .... :-)

Yes. I think these are functions of the ABI and not the inferior. Any interix inferior (local, remote) needs this override. Hence they live in the architecture vector and not the target vector.

I'm not sure what to do about the language side of this though. It could always be parameterized with the current frame's language -> not sure if that is sufficient though.

enjoy,
Andrew



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