This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug cli/17368] Unhelpful error message "Unterminated string in expression."


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]