[Bug breakpoints/14657] New: quotes in breakpoint linespec not saved

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug breakpoints/14657] New: quotes in breakpoint linespec not saved

agentzh at gmail dot com


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: [hidden email]

        ReportedBy: [hidden email]

    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.
Reply | Threaded
Open this post in threaded view
|

[Bug breakpoints/14657] quotes in breakpoint linespec not saved

agentzh at gmail dot com


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.
Reply | Threaded
Open this post in threaded view
|

[Bug breakpoints/14657] quotes in breakpoint linespec not saved

agentzh at gmail dot com
In reply to this post by agentzh at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=14657

Nikolay Mitev <sourceware at hmel dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sourceware at hmel dot org

--- Comment #2 from Nikolay Mitev <sourceware at hmel dot org> ---
This also affects breakpoints with spaces in them. Can't be restored because of
missing quotes.

--
You are receiving this mail because:
You are on the CC list for the bug.