This is the mail archive of the gdb-patches@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: [PATCH] Disable thread specific breakpoints when thread dies


On Wed, Nov 09, 2005 at 05:39:18PM +0000, Andrew STUBBS wrote:
> Hi,
> 
> The attached patch disables thread specific breakpoints if they are hit 
> (in another thread) after the specific thread has died.
> 
> The rationale is that, once dead, the thread in question can never come 
> back, and the breakpoint is then only a, potentially serious, 
> performance drain. Even if another thread can be created with that ID it 
> would not be appropriate to 'hit' the breakpoint.
> 
> The breakpoint is not deleted, only disabled. It may still be easily 
> re-enabled when the program is re-run.
> 
> Is this OK?

Sorry, I don't like this.

First, minor formatting problems:
  - printf_filtered should take a _("gettextized") string now.
  - spaces before opening parentheses (other than in the gettext case)
  - Capital letters and periods in comments.

But about the actual patch...

I'd like to minimize the amount that GDB plays with the user visible
state of breakpoints.  Can we arrange to just not insert breakpoints,
if they are thread-specific to a dead thread?  I think that'll work
too.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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