compile: objfiles lifetime UI
Jan Kratochvil
jan.kratochvil@redhat.com
Wed May 6 12:26:00 GMT 2015
On Thu, 30 Apr 2015 12:53:49 +0200, Jan Kratochvil wrote:
> What about that 2nd case example of:
> (gdb) compile code str = "bar";
> That can be also typed as the 1st case:
> (gdb) compile print str = "bar"
> Obviously "bar" remains the GDB-mmap()ed memory.
Maybe it would be best if GCC can report whether the compiled code exposes
address to its internal object outside - such as by such an assignment or by
passing such a pointer to some external function. I expect some scan of the
IR (intermediate representation - RTL/GIMPLE?) would be sufficient.
IMO for 99% of such compiled code it will not happen and therefore GDB can
quietly and safely discard such injected objfile from the inferior.
It is questionable how many false positives would such a scan-for-address-of
make.
Jan
More information about the Gdb
mailing list