So I had a lot of fun yesterday debugging a strange problem with
autoopts- I'd pass options on the CLI, but they wouldn't be detected
as "set".
ie:
if (HAVE_OPT(FOO)) {
# do something with FOO
}
would return false, even if --foo was passed.
Long story short, the problem ended up having nothing to do with my C
code or a bug in autoopts (it was a problem with automake), but it was
difficult to debug since I couldn't figure out how to get gdb to
provide any information on FOO.
things like:
p FOO
p HAVE_OPT(FOO)
all returned errors in gdb about unknown symbols or something like
that. Can anyone share the trick?
Thanks,
Aaron
--
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
-- Benjamin Franklin
|