diff options
author | David Taylor <taylor@redhat.com> | 2001-03-08 20:45:22 +0000 |
---|---|---|
committer | David Taylor <taylor@redhat.com> | 2001-03-08 20:45:22 +0000 |
commit | ec9a34493d40b2ad20dbfad56ea5ac45078fa749 (patch) | |
tree | 48eb568ef4ccc94e27289341556f4cd4ce00bff8 /gdb | |
parent | a50c34dcb969c7b2a5976ae02842c98b69acdf5d (diff) | |
download | gdb-ec9a34493d40b2ad20dbfad56ea5ac45078fa749.zip gdb-ec9a34493d40b2ad20dbfad56ea5ac45078fa749.tar.gz gdb-ec9a34493d40b2ad20dbfad56ea5ac45078fa749.tar.bz2 |
* stack.c (parse_frame_specification): For one argument case,
handle the situation where the argument is an integer, not an
address -- arguably the most common case. This matters on
targets where pointers and addresses are different.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/stack.c | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 05eeb4d..12114f1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +Thu Mar 8 15:43:40 2001 David Taylor <taylor@redhat.com> + + * stack.c (parse_frame_specification): For one argument case, + handle the situation where the argument is an integer, not an + address -- arguably the most common case. This matters on + targets where pointers and addresses are different. + 2001-03-08 Andrew Cagney <ac131313@redhat.com> * TODO: Revise 5.1 list. Delete PARAMS task. Add coding standard diff --git a/gdb/stack.c b/gdb/stack.c index 19efa2b..95ecdee4 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -704,6 +704,7 @@ parse_frame_specification (char *frame_exp) int numargs = 0; #define MAXARGS 4 CORE_ADDR args[MAXARGS]; + int level; if (frame_exp) { @@ -723,8 +724,15 @@ parse_frame_specification (char *frame_exp) addr_string = savestring (frame_exp, p - frame_exp); { + value_ptr vp; + tmp_cleanup = make_cleanup (xfree, addr_string); - args[numargs++] = parse_and_eval_address (addr_string); + + vp = parse_and_eval (addr_string); + if (numargs == 0) + level = value_as_long (vp); + + args[numargs++] = value_as_pointer (vp); do_cleanups (tmp_cleanup); } @@ -744,7 +752,6 @@ parse_frame_specification (char *frame_exp) /* NOTREACHED */ case 1: { - int level = args[0]; struct frame_info *fid = find_relative_frame (get_current_frame (), &level); struct frame_info *tfid; |