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


On Wed, Apr 18, 2007 at 11:59:47PM +1200, Nick Roberts wrote:
>  > I don't see the point.  If you want to delete breakpoints when you
>  > load a new file, why not just do so?  It's easy with -break-list and
>  > -break-delete.
> 
> I'm thinking that if you load a new program into a front end, there's no need
> to restart GDB, and the user might be surprised to see his old breakpoints are
> still there.  I don't have DDD or Insight to hand to see what they do.
> 
>  > It shouldn't happen automatically.  For instance, one use of
>  > -file-exec-and-symbols is to tell GDB that the file has been recompiled.
> 
> That's independent of the breakpoint issue, isn't it?

Nope.  The difference is that the front end has some knowledge of
"this is a new program" versus "this is the same program being
reloaded", because it issued the command in response to some user
stimulus.  GDB has no way to know why the command was issued; in one
case deleting breakpoints is appropriate, in the other it is not.

So if the front end wants breakpoints deleted, I think it's reasonable
for it to do so explicitly.

-- 
Daniel Jacobowitz
CodeSourcery


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