aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-09-07 08:53:24 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-10-12 23:29:43 +0200
commit9d622bda566a4980b045631f500c29717ede8186 (patch)
tree9b1b8514682d0cd400175bf4306ea99269530a08 /gdb/stack.c
parentfc58fa65d454ce87cfa87a532f2c4f5d0b57d252 (diff)
downloadgdb-9d622bda566a4980b045631f500c29717ede8186.zip
gdb-9d622bda566a4980b045631f500c29717ede8186.tar.gz
gdb-9d622bda566a4980b045631f500c29717ede8186.tar.bz2
gdb: Fix bug with dbx style func command.
The func command, available when starting gdb in dbx mode, is supposed to take a function name and locate the frame for that function in the stack. This has been broken for a while due to an invalid check of the arguments within the worker function. Fixed in this commit. gdb/ChangeLog: * stack.c (func_command): Return early when there is no ARG string. gdb/testsuite/ChangeLog: * gdb.base/dbx.exp (test_func): Remove xfails, update expected results.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index f257ce1..e7c7de9 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -2518,7 +2518,7 @@ func_command (char *arg, int from_tty)
struct function_bounds *func_bounds = NULL;
struct cleanup *cleanups;
- if (arg != NULL)
+ if (arg == NULL)
return;
frame = parse_frame_specification ("0");