diff options
author | John Gilmore <gnu@cygnus> | 1991-09-18 23:24:51 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-09-18 23:24:51 +0000 |
commit | e1a623e7acdb8fc77b46767b4262f8c68980b633 (patch) | |
tree | 13c54469615ea6609d86bba8a6eaac01adc98bfb /gdb/convex-tdep.c | |
parent | 50ee356a1671ee21de9251a0a24c676a68025442 (diff) | |
download | ppe42-binutils-e1a623e7acdb8fc77b46767b4262f8c68980b633.tar.gz ppe42-binutils-e1a623e7acdb8fc77b46767b4262f8c68980b633.zip |
* convex-tdep.c (comm_registers_info): Avoid parsing decimal and
hex -- let parse_and_eval_address do it.
Diffstat (limited to 'gdb/convex-tdep.c')
-rw-r--r-- | gdb/convex-tdep.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gdb/convex-tdep.c b/gdb/convex-tdep.c index 03da95dd21..ce6382b948 100644 --- a/gdb/convex-tdep.c +++ b/gdb/convex-tdep.c @@ -1,5 +1,5 @@ /* Convex stuff for GDB. - Copyright (C) 1990 Free Software Foundation, Inc. + Copyright (C) 1990, 1991 Free Software Foundation, Inc. This file is part of GDB. @@ -760,18 +760,15 @@ comm_registers_info (arg) if (arg) { - if (sscanf (arg, "0x%x", ®num) == 1 - || sscanf (arg, "%d", ®num) == 1) - { - if (regnum > 0) - regnum &= ~0x8000; - } - else if (sscanf (arg, "$c%d", ®num) == 1) + if (sscanf (arg, "$c%d", ®num) == 1) { ; - else if (sscanf (arg, "$C%d", ®num) == 1) + } else if (sscanf (arg, "$C%d", ®num) == 1) { ; - else + } else { regnum = parse_and_eval_address (arg); + if (regnum > 0) + regnum &= ~0x8000; + } if (regnum >= 64) error ("%s: invalid register name.", arg); |