This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
"set foo"
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gdb at sourceware dot org
- Date: Sat, 24 Apr 2010 23:52:31 +0300
- Subject: "set foo"
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
I had a problem today whereby GDB did not recognize a certain struct
when processing a .gdbinit file. Trying to understand what's going
on, I noticed that after stepping through the program for a while, the
struct became known at some point.
I assume that this is because of delayed reading of the symbol tables,
but my question is about something else. I noticed that the .gdbinit
file supplied with Emacs has this line at its beginning:
set main
A comment there says that this is so some variables from the binary
are available when .gdbinit is processed. I understand that this
command somehow manages to force GDB to read the relevant portions of
the symbol tables, but what I don't understand is what is the
semantics of saying "set foo" in GDB where foo is some function. What
does this command do, exactly?
TIA