public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/17368] New: Unhelpful error message "Unterminated string in expression."
@ 2014-09-10  9:24 ams at sourceware dot org
  2014-09-11 15:34 ` [Bug cli/17368] " xdje42 at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: ams at sourceware dot org @ 2014-09-10  9:24 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17368

            Bug ID: 17368
           Summary: Unhelpful error message "Unterminated string in
                    expression."
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: minor
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: ams at sourceware dot org

Back in GDB 7.2 this syntax used to work fine:

  (gdb) break "15 if i==20"

I've not checked 7.3, but GDB 7.4 rejects it:

  (gdb) break "15 if i==20"
  Unterminated string in expression.

And continues to do so in 7.7.1. Removing the quotes solves the problem, of
course.

I'm not sure why that form was ever accepted, or why my customer was trying to
use it, but the problem is that the error message is not at all helpful.

-- 
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 cli/17368] Unhelpful error message "Unterminated string in expression."
  2014-09-10  9:24 [Bug cli/17368] New: Unhelpful error message "Unterminated string in expression." ams at sourceware dot org
@ 2014-09-11 15:34 ` xdje42 at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: xdje42 at gmail dot com @ 2014-09-11 15:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=17368

Doug Evans <xdje42 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xdje42 at gmail dot com

--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
Here's what I get from current trunk:

bash$ gdb
(gdb) b "main if 1"
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 ("main if 1") pending.
(gdb) i b
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   <PENDING>  "main if 1"
(gdb) break "15 if i==20"
No symbol table is loaded.  Use the "file" command.
(gdb) i b
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   <PENDING>  "main if 1"
(gdb) b "main if 2"
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 2 ("main if 2") pending.
(gdb) i b
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   <PENDING>  "main if 1"
2       breakpoint     keep y   <PENDING>  "main if 2"
(gdb) 

There's still a problem here.  I can imagine why "15 if ..." is treated
differently than "main if ..." but then as a user I'm still left wondering why
"What" displays the whole thing in quotes (regardless of whether a digit could
be a legit first character of a function or whatever).

If I then specify a file then I still get unterminated string errors.

(gdb) file ~/hello.x64
Reading symbols from ~/hello.x64...done.
Error in re-setting breakpoint 1: Unterminated string in expression.
Error in re-setting breakpoint 2: Unterminated string in expression.
(gdb) i b
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   <PENDING>  "main if 1"
2       breakpoint     keep y   <PENDING>  "main if 2"
(gdb) 

Trying again, this time specifying the file first:

bash$ make run # I'm in a gdb build tree
(gdb) file ~/hello
(gdb) b "main if 1"
Unterminated string in expression.
(gdb) b "15 if i==20"
No line 15 in the current file.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 ("15 if i==20") pending.
(gdb) i b
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   <PENDING>  "15 if i==20"
(gdb)

-- 
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:[~2014-09-11 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10  9:24 [Bug cli/17368] New: Unhelpful error message "Unterminated string in expression." ams at sourceware dot org
2014-09-11 15:34 ` [Bug cli/17368] " xdje42 at gmail 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).