public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/14657] New: quotes in breakpoint linespec not saved
@ 2012-10-02 16:55 dje at google dot com
  2012-10-02 17:25 ` [Bug breakpoints/14657] " palves at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dje at google dot com @ 2012-10-02 16:55 UTC (permalink / raw)
  To: gdb-prs


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

             Bug #: 14657
           Summary: quotes in breakpoint linespec not saved
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dje@google.com
    Classification: Unclassified


This was discovered while working on bug 14643.

In a gdb that has bug 14643, e.g. 7.5, one should be able to work around the
problem by quoting the file name.
However the quotes are discarded, so while the "break" command succeeds,
resetting the breakpoint, e.g. when the program is run, fails.

bash$ gdb thread.c
GNU gdb (GDB) 7.5
[...]
(gdb) b thread-exit.c:42
malformed linespec error: unexpected keyword, "thread"
(gdb) b 'thread-exit.c':42
Breakpoint 1 at 0x400a28: file thread-exit.c, line 42.
(gdb) r
Starting program: /home/dje/src/play/thread-exit.x64
Error in re-setting breakpoint 1: malformed linespec error: unexpected keyword,
"thread"
(gdb) i b
Num     Type           Disp Enb Address            What
1       breakpoint     keep n   0x0000000000400a28 in main at thread-exit.c:42

If a quote was supplied when the breakpoint was set, it should not be
discarded.

[There is a plan to parse and save linespecs into their component pieces.
Not sure when that will happen, and if we should fix this in the mean time.]

-- 
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] 2+ messages in thread

* [Bug breakpoints/14657] quotes in breakpoint linespec not saved
  2012-10-02 16:55 [Bug breakpoints/14657] New: quotes in breakpoint linespec not saved dje at google dot com
@ 2012-10-02 17:25 ` palves at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: palves at redhat dot com @ 2012-10-02 17:25 UTC (permalink / raw)
  To: gdb-prs


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

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #1 from Pedro Alves <palves at redhat dot com> 2012-10-02 17:25:29 UTC ---
Also affects "save breakpoints":

(gdb) b 'thread.c':42
Breakpoint 5 at 0x5ca5ec: file ../../src/gdb/thread.c, line 42.
(gdb) info breakpoints 5
Num     Type           Disp Enb Address            What
5       breakpoint     keep y   0x00000000005ca5ec in inferior_thread at
../../src/gdb/thread.c:42
(gdb) save breakpoints foo.txt
Saved to file 'foo.txt'.
(gdb) shell cat foo.txt 
break thread.c:42

-- 
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] 2+ messages in thread

end of thread, other threads:[~2012-10-02 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-02 16:55 [Bug breakpoints/14657] New: quotes in breakpoint linespec not saved dje at google dot com
2012-10-02 17:25 ` [Bug breakpoints/14657] " palves 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).