This is the mail archive of the gdb-prs@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]

[Bug breakpoints/15413] New: reliable seg in gdb/breakpoint.c:condition_completer


http://sourceware.org/bugzilla/show_bug.cgi?id=15413

             Bug #: 15413
           Summary: reliable seg in gdb/breakpoint.c:condition_completer
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dave@treblig.org
    Classification: Unclassified


Hi,
  There is a trivially repeatable seg in condition_completer on head; this
was originally filed by Borim here; I as triaging it:

https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1171511

I've repeated this on CVS head; to trigger:

(Original reporter)
1. Start gdb with any program you want to debug
2. set a pending breakpoint, e.g. "b nofile.cxx:54"
3. type "condition 1" + Tab

This seems to come down to gdb/breakpoint.c:condition_completer which has the
code:


      ALL_BREAKPOINTS (b)
      {
1016    int single = b->loc->next == NULL;
        struct bp_location *loc;
        int count = 1;

        for (loc = b->loc; loc; loc = loc->next)
          {

That 'int single' line is where it segs because b->loc is NULL; I think turning
it into something like

  int single;
...
  single = (b->loc)?(b->loc->next==NEXT):1
would do it, but I've not really dug into the datastructure to check what else
that might do.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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