Pending breakpoints in MI

Vladimir Prus ghost@cs.msu.su
Thu Dec 13 16:03:00 GMT 2007


Joel Brobecker wrote:

> Volodya,
> 
> You forgot to provide a ChangeLog...

Oops, sorry. Attached now -- there are three ChangeLog
files affected, and I provide bits for each.

>>  gdb_breakpoint (char *address, char *condition,
>>  int hardwareflag, int tempflag,
>>  int thread, int ignore_count,
>> +                int pending,
>>  char **error_message)
> 
> I can't believe I'm saying this, since I absolutely hate tabs, but
> these are the coding rules: You need to use a tab instead of 8 spaces
> in the line above. Compare for instance how the "char **error_message"
> line is indented.

It appears I've failed to re-configure Emacs properly after 
rearranging my local environment. I've fixed all instances now
(and one function which got space indenting in the previous patch).

>> --- gdb/testsuite/gdb.mi/mi-pending.exp
>> (/patches/pending_mi_2_code_duplication)     (revision 45)
>> +++ gdb/testsuite/gdb.mi/mi-pending.exp
>> (/patches/pending_mi_3_breakpoints)  (revision 45) @@ -0,0 +1,75 @@
>> +# Copyright 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
> 
> Shouldn't the copyright year be only 2007?

Yes, right.

>> --- gdb/mi/mi-cmd-break.c    (/patches/pending_mi_2_code_duplication)
>> (revision 45)
>> +++ gdb/mi/mi-cmd-break.c    (/patches/pending_mi_3_breakpoints)     (revision
>> 45) @@ -63,7 +63,10 @@ enum bp_type
>>     breakpoint.  -break-insert -t -h <location> --> insert a temporary
>>     hw bp.
>>     -break-insert -r <regexp> --> insert a bp at functions matching
>> -   <regexp> */
>> +   <regexp>
>> +
>> +   The -f flag makes GDB create a pending breakpoint if no
>> +   locations for breakpoint are found now.  */
> 
> Actually, I think that the entire comment needs to be rewritten
> in a way that the syntax is not described there at all. Just say
> that this function implements the -break-insert command which, as
> its name suggests, inserts a breakpoint.  The syntax needs to be
> documented in the GDB manual. See
> http://www.sourceware.org/gdb/current/onlinedocs/gdb_25.html#SEC259
> for what is currently documented. Let's use this opportunity to
> make sure that every option (and only the supported options) are
> documented.

I've done so. Eli, does the manual changes in the attached patch look
good to you?

Thanks a lot for the review!
Revised patch attached, is it OK?

- Volodya

        gdb/
        Add support for pending breakpoints in MI.
        * gdb.h (gdb_breakpoint): Add parameter pending.
        * breakpoint.c (break_command_1): Fix formatting.
        (gdb_breakpoint): Add parameter pending.  Fix 
        formatting.
        * mi/mi-cmd-break.c (mi_break_insert): Change
        comment to refer to manual.  Add support for
        the -f flag, for pending breakpoint.
                
        gdb/doc
        * gdb.texinfo (GDB/MI Breakpoint Commands): Document
        the -f option for -break-insert, remove -r option,
        and clarify specification of location.

        gdb/testsuite
        * gdb.mi/mi-pending.exp: New.
        * gdb.mi/mi-pending.c: New.
        * gdb.mi/mi-pendshr.c: New.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pending_mi_3_breakpoints.diff
Type: text/x-diff
Size: 9934 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20071213/b79db0a2/attachment.bin>


More information about the Gdb-patches mailing list