summaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>2001-12-10 23:05:00 +0000
committerFred Fish <fnf@specifix.com>2001-12-10 23:05:00 +0000
commit582d1c226460f8e764789dba912c35fb0361403c (patch)
tree6993d45ad479db867545a6f82affd0bf472a9418 /gdb/eval.c
parentbfe6ecb9282d635857b6b38da994d25beb91a9ea (diff)
downloadgdb-582d1c226460f8e764789dba912c35fb0361403c.tar.gz
Approved by Jim Blandy:
2001-12-10 Fred Fish <fnf@redhat.com> * values.c (value_fn_field): Add physname variable. Use a minimal symbol if we don't find a full symbol. Remove setting of the new value's type since that was already done by allocate_value(). Remove obsolete commented out error call since callees need to handle a NULL return, which is possible result not an error. * eval.c (evaluate_subexp_standard): Move check for inlined functions to precede attempt to dereference a NULL argvec[0].
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index c15b236568c..8a41d30c9cf 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -917,6 +917,8 @@ evaluate_subexp_standard (struct type *expect_type,
if (noside == EVAL_SKIP)
goto nosideret;
+ if (argvec[0] == NULL)
+ error ("Cannot evaluate function -- may be inlined");
if (noside == EVAL_AVOID_SIDE_EFFECTS)
{
/* If the return type doesn't look like a function type, call an
@@ -934,8 +936,6 @@ evaluate_subexp_standard (struct type *expect_type,
else
error ("Expression of type other than \"Function returning ...\" used as function");
}
- if (argvec[0] == NULL)
- error ("Cannot evaluate function -- may be inlined");
return call_function_by_hand (argvec[0], nargs, argvec + 1);
/* pai: FIXME save value from call_function_by_hand, then adjust pc by adjust_fn_pc if +ve */