public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "palves at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/15501] New: 'disable 3.1 3.2 3.3' doesn't work as expected.
Date: Mon, 20 May 2013 16:44:00 -0000	[thread overview]
Message-ID: <bug-15501-4717@http.sourceware.org/bugzilla/> (raw)

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

             Bug #: 15501
           Summary: 'disable 3.1 3.2 3.3' doesn't work as expected.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: palves@redhat.com
    Classification: Unclassified


While "disable 1 2 3 4" works as expected, if one passes location numbers
instead of breakpoint numbers, then only the first location is updated.  Vis:

(gdb) info breakpoints 
No breakpoints or watchpoints.
(gdb) b main
Breakpoint 2 at 0x4004cf: file main.c, line 5.
(gdb) b main
Note: breakpoint 2 also set at pc 0x4004cf.
Breakpoint 3 at 0x4004cf: file main.c, line 5.
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) disable 2 3
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep n   0x00000000004004cf in main at main.c:5
3       breakpoint     keep n   0x00000000004004cf in main at main.c:5
(gdb) enable 2 3
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) disable 2.1 3.1
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   <MULTIPLE>         
2.1                         n     0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) enable 2.1 3.1
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5

In fact, everything after the first location is ignored:

(gdb) disable 2.1 foofoobar
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   <MULTIPLE>         
2.1                         n     0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) 

That should warn, just like:

(gdb) disable 2 foofoobar
warning: bad breakpoint number at or near 'foofoobar'

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


             reply	other threads:[~2013-05-20 16:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 16:44 palves at redhat dot com [this message]
2013-08-06 18:48 ` [Bug breakpoints/15501] 'disable 3.1 3.2 3.3' doesn't work as expected. (likewise "enable") palves at redhat dot com
2013-08-15 10:38 ` mwaqas at codesourcery dot com
2013-08-23  6:22 ` cvs-commit at gcc dot gnu.org
2013-08-23  6:25 ` mwaqas at codesourcery dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15501-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).