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 1/2] Global breakpoints, GDB part


> Date: Mon, 13 Jun 2011 09:10:52 -0700
> From: Stan Shebs <stanshebs@earthlink.net>
> 
> This pair of patches plus Linux kernel module adds global breakpoints to 
> GDB.

Thanks.

> it pushes the envelope on hooking into the system, and in the
> absence of full multi-process infrastructure, the user interface is
> a little hacky.

It is, indeed.  See below.

>   It is also possible to insert a breakpoint that will stop the program
> ! only if a specific thread (@pxref{Thread-Specific Breakpoints}) or a
> ! specific task (@pxref{Ada Tasks}) hits that breakpoint.  In addition,
> ! a global breakpoint (@pxref{Global Breakpoints}) may be set to stop
> ! processes not under GDB's control and give you a chance to attach to
                        ^^^
@value{GDBN}

> + @node Global Breakpoints
> + @section Using Global Breakpoints to Stop Processes

Each section should have a @cindex entry for its main subject(s).

> + If you are trying to debug a problem in a system with many interacting
> + programs and processes, it may prove difficult to find the right
> + process in which to set a breakpoint. In the usual @value{GDBN} usage
                                        ^^
Two spaces, please.

> +                                 However, @value{GDBN} will not insert
> + global breakpoints into its own process, nor any process that is under
> + a debugger's control.

"a debugger's control"?  Is this correct English?

> + If the current inferior is included in @var{processes}, then the
> + breakpoint also acts as a normal breakpoint for the inferior.

Not clear what you mean here.  What is "current inferior" in this
context, and how is the breakpoint different from a "normal" one if
the current inferior is not included in the list?

> + Global breakpoints remain in effect after you detach from a process.

Which one?  There could be several.

> + The process specification is basically a comma-separated list of pids
> + and wild cards.  The specification may not have any whitespace
> + embedded.

Ouch! why is whitespace disallowed?

> + @item /*
> + Says the specification applies to all users' processes.

Why the slash?

> + @item /@var{name}
> + Says that the specification applies to all processes of user @var{name}.

Same here.  Also, I would suggest to use @var{username} or maybe just
@var{user}.

> + @item QGBreakDelete:@var{gbnum}
> + @cindex @samp{QBreakDelete} packet
> + Request the target to delete the global breakpoint @var{gbnum}, where
> + the number is as returned by @code{QBreakDefine}.
> + 
> + If the deletion is successful, the target should return @code{OK}.
> + 
> + @item QGBreakInsert:@var{gbnum}:@var{pid}
> + @cindex @samp{QBreakInsert} packet
> + Request the target to insert the global breakpoint @var{gbnum} into
> + the process @var{pid}.
> + 
> + If the deletion is successful, the target should return @code{OK}.
           ^^^^^^^^
A copy-paste error, I presume.


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