This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: question about -file-exec-and-symbols gdbmi command
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: Dodji Seketeli <dodji at seketeli dot org>
- Cc: GDB Discuss <gdb at sources dot redhat dot com>
- Date: Wed, 18 Apr 2007 21:58:49 +1200
- Subject: Re: question about -file-exec-and-symbols gdbmi command
- References: <20070418111206.45c55d72@coin>
> 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