From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Jakub Jelinek <jakub@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Fix sparc-*-linux register fetching/storing
Date: Mon, 12 Nov 2001 19:11:00 -0000 [thread overview]
Message-ID: <3C02A761.4030003@cygnus.com> (raw)
Message-ID: <20011112191100.-1C6bUC_bgs8XEHV3xQOvPqoTKMjAJpafYLlO_kHlwg@z> (raw)
In-Reply-To: <20011126150435.A6212@nevyn.them.org>
>> That sounds like overkill. If you need to be doing sign/zero extension
>> stuff then I'd be looking at explicit calls to extract_signed_integer()
>> and/or extract_unsigned_integer() in the nat code.
>>
>> A sequence like:
>>
>> void *buf = alloca (MAX_REGISTER_RAW_SIZE);
>> regcache_collect (my reg, buf);
>> LONGEST val = extract_unsigned_integer (buf, REGISTER_RAW_SIZE(my reg));
>> store_unsigned_integer (dest, dest size, val);
>>
>> should insulate it from the current problems.
>
>
> But won't we want this absolutely every time we extract a CORE_ADDR?
> And for that matter, I'm talking about getting a target memory address
> out of a register; is store_*signed_integer right for that? Is there
> an extract_pointer or so?
In *-nat.c? Now I'm confused :-)
Doesn't the *-nat.c file just copy raw register bytes between the
regcache and the /proc or ptrace() interface? The only complication I
could see is if someone used 32 bit ptrace calls to get the values for a
regcache that had space for 64 bit registers - the above code snipit
would handle that.
The reason for suggesting extract/store signed/unsigned integer is that
they have clear, machine independant, semantics that work on
uninterpreted (well apart from assuming they are integers :-) bytes.
?
Andrew
next prev parent reply other threads:[~2001-11-26 20:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-10 9:20 Jakub Jelinek
2001-11-10 13:03 ` Daniel Jacobowitz
2001-11-10 16:27 ` Jakub Jelinek
2001-11-10 16:35 ` Daniel Jacobowitz
2001-11-10 16:41 ` Jakub Jelinek
2001-11-10 16:42 ` Daniel Jacobowitz
2001-11-12 10:39 ` Andrew Cagney
2001-11-26 9:18 ` Andrew Cagney
2001-11-26 12:04 ` Daniel Jacobowitz
2001-11-12 18:40 ` Daniel Jacobowitz
2001-11-26 12:34 ` Andrew Cagney [this message]
2001-11-12 19:11 ` Andrew Cagney
2001-11-13 8:19 ` Daniel Jacobowitz
2001-11-26 12:43 ` Daniel Jacobowitz
2001-11-26 13:19 ` Andrew Cagney
2001-11-13 8:28 ` Andrew Cagney
2001-11-26 9:08 ` Andrew Cagney
2001-11-12 10:04 ` 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=3C02A761.4030003@cygnus.com \
--to=ac131313@cygnus.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jakub@redhat.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