summaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-03-21 15:33:11 +0000
committerDaniel Jacobowitz <drow@false.org>2008-03-21 15:33:11 +0000
commit6214f497d3f1800171978839ef029f712369e2f9 (patch)
treeaf177c71d56a8b1a91799e3891ca8e7719631ce0 /gdb/symtab.c
parent6309237547d076d68daaf8f4d0cd55c5964e1411 (diff)
downloadbinutils-gdb-6214f497d3f1800171978839ef029f712369e2f9.tar.gz
2008-03-21 Chris Demetriou <cgd@google.com>
* symtab.c (rbreak_command): Quote symbol name before passing it to break_command. * gdb.base/break.exp (rbreak junk): New test for rbreak "Junk at end of arguments" issue.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 40e31dc45da..ddd2310165d 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3345,7 +3345,13 @@ rbreak_command (char *regexp, int from_tty)
}
else
{
- break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty);
+ char *string = alloca (strlen (SYMBOL_LINKAGE_NAME (p->msymbol))
+ + 3);
+ strcpy (string, "'");
+ strcat (string, SYMBOL_LINKAGE_NAME (p->msymbol));
+ strcat (string, "'");
+
+ break_command (string, from_tty);
printf_filtered ("<function, no debug info> %s;\n",
SYMBOL_PRINT_NAME (p->msymbol));
}