From: Mark Kettenis <kettenis@chello.nl>
To: nathanw@wasabisystems.com, jimb@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Some regset-related cleanup for i386bsd-nat.c
Date: Tue, 08 Jun 2004 23:38:00 -0000 [thread overview]
Message-ID: <200406082338.i58NcL8w000658@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <mtuu0xlu65w.fsf@contents-vnder-pressvre.mit.edu> (nathanw@wasabisystems.com)
From: "Nathan J. Williams" <nathanw@wasabisystems.com>
Date: 08 Jun 2004 16:49:15 -0400
Mark Kettenis <kettenis@chello.nl> writes:
> * i386bsd-nat.c: Don't include "gregset.h".
> (supply_gregset, fill_gregset): Make static.
> (supply_fpregset, fill_fpregset): Remove.
I just noticed this in one of my builds. I'm attempting to modernize
and prepare my NetBSD thread support code for integration, and that
code uses the {supply,fill}_{regset,fpregset} functions to implement
the thread-specific fetch_registers and store_registers, based on
register context passed back from the pthread debugging library (It
was quite a boon when I ported it forward from 5.0 to 5.3 and got
these functions to use). If these are removed, is there a good way for
an architecture-neutral bit of code like nbsd-thread.c to go back and
forth between GDB's register storage and native register storage?
It's not entirely cristallized out yet, but yes there will be. The
idea is to use "register sets" as fleshed out in regset.h. A register
set contains a supply_regset() and collect_regset() member function
that knows how to convert between a target's register sets
(i.e. `struct reg' and `struct fpreg' for *BSD) and GDB's internal
register cache. These register sets are already used for core files.
We have a gdbarch_regset_from_core_section() function that returns the
appropriate register set for a particular core section. See corelow.c
and fbsd-proc.c for how this is used to read and write core files.
Jim Blandy is currently working on thread-related stuff for Linux
(powerpc and perhaps i386) that's going to use these registers sets.
We'll probably need to introduce a new
gdbarch_regset_from_thread_xxx() for the thread stuff. The NetBSD
stuff should use similar code.
If you have any questions, or just want to show some code, please
don't hesitate to bug me about it.
Cheers
Mark
next prev parent reply other threads:[~2004-06-08 23:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-31 10:01 Mark Kettenis
2004-06-08 20:49 ` Nathan J. Williams
2004-06-08 23:38 ` Mark Kettenis [this message]
2004-06-09 16:20 ` 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=200406082338.i58NcL8w000658@elgar.kettenis.dyndns.org \
--to=kettenis@chello.nl \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@redhat.com \
--cc=nathanw@wasabisystems.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