This is the mail archive of the gdb-patches@sources.redhat.com 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: RFC: Centralize DECR_PC_AFTER_BREAK handling from infrun


Date: Sun, 18 Jan 2004 10:19:10 -0500
From: Daniel Jacobowitz <drow@mvista.com>

> > What happens if a location has both software and hardware
> breakpoints? Does the code still DTRT?


Hmm, I am not sure. What _is_ the right thing?


We should at least do no worse than the current code does--which is to
act as if only the first breakpoint (in the order stored in the
breakpoint data-base) were hit.  That is, if breakpoints #n and #m
both fire, the current GDB announces the one whose number is smaller
(because it walks thru the breakpoints in their numerical order).  It
doesn't seem to matter whether the breakpoints are of the software or
the hardware-assisted variety.

It would be nice if we could announce all breakpoints that break at
that point, but this might not be possible or very hard, I dunno.

I'm not that sure that the current code is right though :-( I recall comlaints about the current behavior - it should report all possible reasons for breaking and not just the first.


Andrew



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