question about -file-exec-and-symbols gdbmi command
Nick Roberts
nickrob@snap.net.nz
Wed Apr 18 10:01:00 GMT 2007
> I am using gdb with the mi2 interpreter.
>
> I do -file-exec-and-symbols <prog-1>, set a couple of
> breakpoints, do a bit of debugging a bit etc.
>
> Then I do a -file-exec-and-symbols <prog-2> .
> At this point, gdb tries to set the breakpoint I have set previously,
> while debugging <prog-1>. Of course, that attempt fails. Is this
> behavious normal ? I would have thought that gdb should clear the
> current breakpoints when -file-exec-and-symbols is run on a new exec
> file.
-file-exec-and-symbols is really just the `file' command:
In mi-cmds.c:
{ "file-exec-and-symbols", { "file", 1 }, NULL, NULL },
so it's not restricted to MI.
I don't really use either but maybe it would be inconvenient to have all
the breakpoints cleared, if you wanted to switch to another version of the
same program, say. It's easier to delete then all manually, just with `delete'
than it is to add them back again.
Perhaps it could be a GDB option.
--
Nick http://www.inet.net.nz/~nickrob
More information about the Gdb
mailing list