Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Aaron J. Grier" <aaron@frye.com>
To: gdb-patches@sources.redhat.com
Subject: write_register_bytes() confusion
Date: Mon, 01 Jul 2002 12:20:00 -0000	[thread overview]
Message-ID: <20020701122039.Q12218@aaron.internal> (raw)

I'm in the middle of bringing BDM for m68k support into current gdb, and
while I have fixed the most blatant calling convention changes (pid
changing to pid_t, etc) write_register_bytes() in regcache has got me
horribly confused.

not to mention all this m68k craziness happening elsewhere.  ;)

in v1.61 of valops.c (which appears to be current) there is the snippet:

write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
                      VALUE_CONTENTS (fromval), TYPE_LENGTH (type));

I'm writing a register -- it seems in my case this should be:

write_register_bytes (VALUE_REGNO (toval), VALUE_CONTENTS (fromval), 1);

the 1 of course is machine dependent

what I'm seeing is the register number getting completely thrashed on
the way through.

yet all calls to write_register_bytes are using VALUE_ADDRESS?

insane.  I'm starting to think I need to back off -current and just
stick with gdb-5.0...

-- 
  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron@frye.com


             reply	other threads:[~2002-07-01 19:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-01 12:20 Aaron J. Grier [this message]
2002-07-01 15:13 ` 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=20020701122039.Q12218@aaron.internal \
    --to=aaron@frye.com \
    --cc=gdb-patches@sources.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