This is the mail archive of the gdb@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: malloc in inferior



For some stubs these would be useful; for the stubs I deal with, which
sit in user space on normal OS's, rather less so.  The stub would end
up calling malloc anyway.

Personally, I'm of the opinion that we should solve this problem by
changing the definitions: mark strings as ephemeral and let the user
call malloc or strdup directly if they want something to last.

That wouldn't work. A user needs to be able to cut/paste arbitrary C source code into the GDB console and have it just work.


Given that most users don't even realize that the malloc is being called, I think it is working well.

 Or make
it a set option.  I'm not sure how popular that idea would be; anyone
else have a comment?

A set option, or (discussed previously) allocated lazy fashion.


Andrew



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