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

* [Bug breakpoints/15413] reliable seg in gdb/breakpoint.c:condition_completer
  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 ` dave at treblig dot org
  2013-05-06  0:12 ` sergiodj at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 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

--- Comment #1 from Dr. David Alan Gilbert <dave at treblig dot org> 2013-04-28 16:32:44 UTC ---
oops, 
  single = (b->loc)?(b->loc->next==NULL):1

I meant.

-- 
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

* [Bug breakpoints/15413] reliable seg in gdb/breakpoint.c:condition_completer
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sergiodj at redhat dot com @ 2013-05-06  0:12 UTC (permalink / raw)
  To: gdb-prs

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

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |sergiodj at redhat dot com

--- Comment #2 from Sergio Durigan Junior <sergiodj at redhat dot com> 2013-05-06 00:12:24 UTC ---
Working on a patch.

-- 
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

* [Bug breakpoints/15413] reliable seg in gdb/breakpoint.c:condition_completer
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sergiodj at redhat dot com @ 2013-05-06  0:14 UTC (permalink / raw)
  To: gdb-prs

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

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |sergiodj at redhat dot com
                   |dot org                     |

-- 
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

* [Bug breakpoints/15413] reliable seg in gdb/breakpoint.c:condition_completer
  2013-04-28 16:32 [Bug breakpoints/15413] New: reliable seg in gdb/breakpoint.c:condition_completer dave at treblig dot org
                   ` (2 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-05-07 17:04 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2013-05-07 17:04:58 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Branch:     gdb_7_6-branch
Changes by:    sergiodj@sourceware.org    2013-05-07 17:04:57

Modified files:
    gdb            : ChangeLog breakpoint.c 
    gdb/testsuite  : ChangeLog 
    gdb/testsuite/gdb.base: pending.exp 
    gdb/testsuite/gdb.linespec: linespec.exp 

Log message:
    gdb/
    2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

    PR breakpoints/15413:
    * breakpoint.c (condition_completer): Simplify the code to
    disconsider multiple locations of breakpoints when completing the
    "condition" command.

    gdb/testsuite/
    2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

    PR breakpoints/15413:
    * gdb.base/pending.exp: Add test for completion of the "condition"
    command for pending breakpoints.
    * gdb.linespec/linespec.ex: Add test for completion of the
    "condition" command when dealing with multiple locations.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.15260.2.50&r2=1.15260.2.51
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.745.2.5&r2=1.745.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.3580.2.20&r2=1.3580.2.21
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/pending.exp.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.27&r2=1.27.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.linespec/linespec.exp.diff?cvsroot=src&only_with_tag=gdb_7_6-branch&r1=1.6&r2=1.6.2.1

-- 
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

* [Bug breakpoints/15413] reliable seg in gdb/breakpoint.c:condition_completer
  2013-04-28 16:32 [Bug breakpoints/15413] New: reliable seg in gdb/breakpoint.c:condition_completer dave at treblig dot org
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2013-05-07 17:04 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2013-05-07 17:04:30 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    sergiodj@sourceware.org    2013-05-07 17:04:29

Modified files:
    gdb            : ChangeLog breakpoint.c 
    gdb/testsuite  : ChangeLog 
    gdb/testsuite/gdb.base: pending.exp 
    gdb/testsuite/gdb.linespec: linespec.exp 

Log message:
    gdb/
    2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

    PR breakpoints/15413:
    * breakpoint.c (condition_completer): Simplify the code to
    disconsider multiple locations of breakpoints when completing the
    "condition" command.

    gdb/testsuite/
    2013-05-07  Sergio Durigan Junior  <sergiodj@redhat.com>

    PR breakpoints/15413:
    * gdb.base/pending.exp: Add test for completion of the "condition"
    command for pending breakpoints.
    * gdb.linespec/linespec.ex: Add test for completion of the
    "condition" command when dealing with multiple locations.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15530&r2=1.15531
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/breakpoint.c.diff?cvsroot=src&r1=1.760&r2=1.761
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3648&r2=1.3649
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/pending.exp.diff?cvsroot=src&r1=1.27&r2=1.28
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.linespec/linespec.exp.diff?cvsroot=src&r1=1.7&r2=1.8

-- 
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

* [Bug breakpoints/15413] reliable seg in gdb/breakpoint.c:condition_completer
  2013-04-28 16:32 [Bug breakpoints/15413] New: reliable seg in gdb/breakpoint.c:condition_completer dave at treblig dot org
                   ` (4 preceding siblings ...)
  2013-05-07 17:04 ` cvs-commit at gcc dot gnu.org
@ 2013-05-07 17:08 ` sergiodj at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: sergiodj at redhat dot com @ 2013-05-07 17:08 UTC (permalink / raw)
  To: gdb-prs

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

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Sergio Durigan Junior <sergiodj at redhat dot com> 2013-05-07 17:08:04 UTC ---
Fixed.  Thanks for the report.

-- 
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).