This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about -file-exec-and-symbols gdbmi command


 > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]