public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/15413] New: reliable seg in gdb/breakpoint.c:condition_completer
@ 2013-04-28 16:32 dave at treblig dot org
  2013-04-28 16:32 ` [Bug breakpoints/15413] " dave at treblig dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dave at treblig dot org @ 2013-04-28 16:32 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-07 17:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-28 16:32 [Bug breakpoints/15413] New: reliable seg in gdb/breakpoint.c:condition_completer dave at treblig dot org
2013-04-28 16:32 ` [Bug breakpoints/15413] " dave at treblig dot org
2013-05-06  0:12 ` sergiodj at redhat dot com
2013-05-06  0:14 ` sergiodj at redhat dot com
2013-05-07 17:04 ` cvs-commit at gcc dot gnu.org
2013-05-07 17:04 ` cvs-commit at gcc dot gnu.org
2013-05-07 17:08 ` sergiodj at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).