From: Joel Brobecker <brobecker@gnat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Question regarding i386v4-nat.c:supply_gregset and fill_gregset
Date: Tue, 06 Aug 2002 18:04:00 -0000 [thread overview]
Message-ID: <20020807010426.GN916@gnat.com> (raw)
Hello Mark,
Following your suggestion to use i386v4-nat.c for the interix port,
I was indeed impressed to see that, after simplifying supply_gregset()
and fill_gregset() as you indicated, they become (almost identical) to
their counterpart in i386v4-nat.
But there is one difference that causes some grief on interix, and I
had to modify these 2 functions like this to make them to work for
interix:
- greg_t *regp = (greg_t *) gregsetp;
+ greg_t *regp = (greg_t *) & gregsetp->gregs;
Indeed, on Interix, the gregs buffer is not located at the begining
of the gregset_t structure. So the function were reading/writting at
the wrong location.
The trouble is I don't have any machine handy to verify this change
on the other platforms. I have the feeling, though, that type gregset_t
is not always a structure, and hence makes my change only valid for
interix. If this is the case, then I am afraid we won't be able to reuse
i386v4-nat.c that easily. Maybe we should implement 2 new functions
similar to i387_supply_fsave and i387_fill_fsave (in i386-nat.[hc]?):
i386_supply_gregset (greg_t *gregp);
i386_fill_gregset (greg_t *gregp, int regno);
both i386v4-nat.c and i386-interix-nat.c would use them to implement
supply/fill_gregset.
What do you think?
--
Joel
next reply other threads:[~2002-08-07 1:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-06 18:04 Joel Brobecker [this message]
2002-08-07 6:16 ` Daniel Jacobowitz
2002-08-13 15:06 ` Mark Kettenis
2002-08-13 15:53 ` Joel Brobecker
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=20020807010426.GN916@gnat.com \
--to=brobecker@gnat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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