From: Andrew Cagney <ac131313@redhat.com>
To: Steve Watt <steve@asicdesigners.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch rfc, 6.0?] only allow raw raw registers; Was: [patch rfc] Add NUM_REGS pseudo regs to MIPS
Date: Sun, 27 Jul 2003 21:23:00 -0000 [thread overview]
Message-ID: <3F2442B3.1000506@redhat.com> (raw)
In-Reply-To: <200307271855.h6RItIho043770@oberon.asicdesigners.com>
[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]
> Undefined info command: "regs". Try "help info".
> (gdb) info regi
> zero at v0 v1 a0 a1 a2 a3
> R90 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> t0 t1 t2 t3 t4 t5 t6 t7
> R98 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> s0 s1 s2 s3 s4 s5 s6 s7
> R106 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> t8 t9 k0 k1 gp sp s8 ra
> R114 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> sr lo hi bad cause pc
> 00400004 00000000 00000000 00000000 00000000 a0020004
> fsr fir
> 00000000 00000000
> (gdb)
>
> It's displaying stuff (and further runs appear correct), but the register
> number in the left column needs 90 subtracted. (Well, I'm sure there's
> a real fix, but...)
Ah, oops. The real fix IS `regnum - 90' (well regnum % NUM_REGS). See
attached.
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 877 bytes --]
2003-07-27 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (print_gp_register_row): Print the GPR's register
MOD NUM_REGS.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.223
diff -u -r1.223 mips-tdep.c
--- mips-tdep.c 7 Jul 2003 17:36:26 -0000 1.223
+++ mips-tdep.c 27 Jul 2003 21:15:40 -0000
@@ -4286,10 +4286,10 @@
col++;
}
/* print the R0 to R31 names */
- fprintf_filtered (file,
- (start_regnum % NUM_REGS) < MIPS_NUMREGS
- ? "\n R%-4d" : "\n ",
- start_regnum);
+ if ((start_regnum % NUM_REGS) < MIPS_NUMREGS)
+ fprintf_filtered (file, "\n R%-4d", start_regnum % NUM_REGS);
+ else
+ fprintf_filtered (file, "\n ");
/* now print the values in hex, 4 or 8 to the row */
for (col = 0, regnum = start_regnum;
next prev parent reply other threads:[~2003-07-27 21:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-27 18:55 Steve Watt
2003-07-27 21:23 ` Andrew Cagney [this message]
2003-07-28 15:37 ` Andrew Cagney
2003-07-28 16:38 ` Daniel Jacobowitz
2003-08-18 17:09 ` Daniel Jacobowitz
2003-08-18 17:42 ` Andrew Cagney
2003-08-20 16:44 ` Daniel Jacobowitz
2003-07-31 21:00 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2003-07-21 22:57 Steve Watt
2003-07-27 13:50 ` [patch rfc, 6.0?] only allow raw raw registers; Was: " Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F2442B3.1000506@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=steve@asicdesigners.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox