aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-07-12 23:16:45 +0000
committerMichael Snyder <msnyder@vmware.com>2000-07-12 23:16:45 +0000
commit1a1404f11ef152b478c870d1231bc1990254597c (patch)
treef56a28655206ea0147358b94bb13a3a0c7674b50 /gdb
parentfcdc5976b34caefdbc10b76bd953394916a44856 (diff)
downloadgdb-1a1404f11ef152b478c870d1231bc1990254597c.zip
gdb-1a1404f11ef152b478c870d1231bc1990254597c.tar.gz
gdb-1a1404f11ef152b478c870d1231bc1990254597c.tar.bz2
* parse.c (target_map_name_to_register): Include pseudo-regs.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog1
-rw-r--r--gdb/parse.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 326025d..60d0003 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -24,6 +24,7 @@
(write_register): Ditto.
(build_regcache): Allocate enough register_valid space for
pseudo-registers as well as normal (real) ones.
+ * parse.c (target_map_name_to_register): Include pseudo-regs.
Tue Jul 11 19:45:42 2000 Andrew Cagney <cagney@b1.cygnus.com>
diff --git a/gdb/parse.c b/gdb/parse.c
index a39c21d..d17dd9f 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -131,7 +131,15 @@ target_map_name_to_register (str, len)
return i;
}
- /* Try standard aliases */
+ /* Try pseudo-registers, if any. */
+ for (i = NUM_REGS; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
+ if (REGISTER_NAME (i) && len == strlen (REGISTER_NAME (i))
+ && STREQN (str, REGISTER_NAME (i), len))
+ {
+ return i;
+ }
+
+ /* Try standard aliases. */
for (i = 0; i < num_std_regs; i++)
if (std_regs[i].name && len == strlen (std_regs[i].name)
&& STREQN (str, std_regs[i].name, len))