From: Daniel Jacobowitz <drow@false.org>
To: Roger Sayle <roger@eyesopen.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Correct irix5-nat.c's fetch_core_registers
Date: Mon, 24 Jul 2006 21:46:00 -0000 [thread overview]
Message-ID: <20060724214557.GA18918@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0607241339520.22774-100000@www.eyesopen.com>
On Mon, Jul 24, 2006 at 03:03:23PM -0600, Roger Sayle wrote:
> The current implementation in fetch_core_registers has two main
> clauses. The first which currently reads "core_reg_size ==
> deprecated_register_bytes ()" really expects deprecated_register_bytes
> to return 568, or 8*NUM_REGS are explained in the original post.
This is the part at which your logic breaks down. Remember this one
for a moment...
> The good news is I think I may be able to get O32 to work. Turns
> out in O32 core files, core_reg_size=284 (which is conveniently
> 4*NUM_REGS). It also looks like when working on an O32 executable,
> mips_isa_regsize is 4 (even on my MIPS4 box). So this aspect of
> the logic seems simple enough, even though I'm not sure how much
> other support would need to be added to GDB to finish an O32 port.
...and then look at this. At one point, at least, the first branch was
taken for both o32 and n64. If you look at the code in that branch,
this seems fairly sensible.
What is probably confusing you is the mips_isa_regsize bits. They're
much more recent than the rest of the code, so don't read too much into
them; and they were added mechanically.
Registers 0 - NUM_REGS are represented in the register cache as having
mips_isa_regsize bytes, which is not necessarily the same as the ABI
regsize. You can just accomodate that here. If the core register set
size matches the ISA register size, just read them in. It should
match. You can check and warn if they don't.
IOW I think the entire else branch is dead; it reads in four bytes of
N32 64-bit registers. Not very useful!
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-07-24 21:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-21 16:41 Roger Sayle
2006-07-24 19:49 ` Daniel Jacobowitz
2006-07-24 21:34 ` Roger Sayle
2006-07-24 21:46 ` Daniel Jacobowitz [this message]
2006-07-25 16:31 ` [PATCH] Correct irix5-nat.c's fetch_core_registers (take 2) Roger Sayle
2006-07-27 21:27 ` Daniel Jacobowitz
2006-07-25 17:31 [PATCH] Correct irix5-nat.c's fetch_core_registers David Anderson
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=20060724214557.GA18918@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=roger@eyesopen.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