This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: add-symbol-file arguments
> >
> >
> > Is it possible to "stringify" the value in a variable and use the
> > result in another gdb command. The specific command is
> > add-symbol-file.
>
> Not yet, but the ongoing Python integration will allow this easily.
>
> Well, that's not entirely true. You can do it now, but it's ugly...
> you can steal the "set logging" command to generate output to a
> temporary file, generate output using the "printf" command,
> and then "source" it. It's not highly recommended :-)
[Manning, Sidney]
Thanks for the info. The following worked well enough for me:
define modload
set logging overwrite on
set logging on /tmp/gg
printf `add-symbol-file %s 0x%x\n`, module, addr
set logging off
source /tmp/gg
end
Setting this to run at a given breakpoint will provide the automation that was wanted.