From: Michael Snyder <msnyder@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Save SSE registers to generated core files, without breaking other architectures
Date: Tue, 02 Apr 2002 14:00:00 -0000 [thread overview]
Message-ID: <3CAA274A.C0170CF@redhat.com> (raw)
In-Reply-To: <20020402145546.A7582@nevyn.them.org>
Daniel Jacobowitz wrote:
>
> How does this patch look? The original problem was that we can not rely on
> HAVE_PTRACE_FPXREGSET, because the presence of PTRACE_FPXREGSET doesn't
> imply that GDB has a fill_fpxregset function available. I updated it to
> check for a separate flag. It's not ideal, but until we separate regset
> handling into an appropriate vector, it's the best we can do (I think).
>
> OK?
Well, I like it (and thanks for working on it),
but Andrew might have something to say about adding
a new macro. Andrew?
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
>
> 2002-04-02 Daniel Jacobowitz <drow@mvista.com>
>
> * config/i386/tm-linux.h: Define FILL_FPXREGSET.
> * gregset.h: If FILL_FPXREGSET is defined, provide
> gdb_fpxregset_t, supply_fpxregset, and fill_fpxregset.
> * linux-proc.c (linux_do_thread_registers): If FILL_FPXREGSET
> is defined, call fill_fpxregset.
>
> Index: gregset.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/gregset.h,v
> retrieving revision 1.5
> diff -u -p -r1.5 gregset.h
> --- gregset.h 2002/02/24 22:14:33 1.5
> +++ gregset.h 2002/04/02 19:51:15
> @@ -52,5 +52,18 @@ extern void supply_fpregset (gdb_fpregse
> extern void fill_gregset (gdb_gregset_t *gregs, int regno);
> extern void fill_fpregset (gdb_fpregset_t *fpregs, int regno);
>
> +#ifdef FILL_FPXREGSET
> +/* Linux/i386: Copy register values between GDB's internal register cache
> + and the i386 extended floating point registers. */
> +
> +#ifndef GDB_FPXREGSET_T
> +#define GDB_FPXREGSET_T elf_fpxregset_t
> +#endif
> +
> +typedef GDB_FPXREGSET_T gdb_fpxregset_t;
> +
> +extern void supply_fpxregset (gdb_fpxregset_t *fpxregs);
> +extern void fill_fpxregset (gdb_fpxregset_t *fpxregs, int regno);
> +#endif
>
> #endif
> Index: linux-proc.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linux-proc.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 linux-proc.c
> --- linux-proc.c 2002/03/25 19:47:41 1.8
> +++ linux-proc.c 2002/04/02 19:51:15
> @@ -167,6 +167,9 @@ linux_do_thread_registers (bfd *obfd, pt
> {
> gdb_gregset_t gregs;
> gdb_fpregset_t fpregs;
> +#ifdef FILL_FPXREGSET
> + gdb_fpxregset_t fpxregs;
> +#endif
> unsigned long merged_pid = ptid_get_tid (ptid) << 16 | ptid_get_pid (ptid);
>
> fill_gregset (&gregs, -1);
> @@ -183,6 +186,14 @@ linux_do_thread_registers (bfd *obfd, pt
> note_size,
> &fpregs,
> sizeof (fpregs));
> +#ifdef FILL_FPXREGSET
> + fill_fpxregset (&fpxregs, -1);
> + note_data = (char *) elfcore_write_prxfpreg (obfd,
> + note_data,
> + note_size,
> + &fpxregs,
> + sizeof (fpxregs));
> +#endif
> return note_data;
> }
>
> Index: config/i386/tm-linux.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/i386/tm-linux.h,v
> retrieving revision 1.17
> diff -u -p -r1.17 tm-linux.h
> --- tm-linux.h 2002/02/24 22:56:05 1.17
> +++ tm-linux.h 2002/04/02 19:51:46
> @@ -26,6 +26,7 @@
> #define I386_GNULINUX_TARGET
> #define HAVE_I387_REGS
> #ifdef HAVE_PTRACE_GETFPXREGS
> +#define FILL_FPXREGSET
> #define HAVE_SSE_REGS
> #endif
>
next prev parent reply other threads:[~2002-04-02 22:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-02 11:55 Daniel Jacobowitz
2002-04-02 14:00 ` Michael Snyder [this message]
2002-04-14 15:22 ` Andrew Cagney
2002-04-14 18:51 ` Daniel Jacobowitz
2002-04-14 19:09 ` Andrew Cagney
2002-04-24 14:47 ` [RFA] Save SSE registers to generated core files, without breakingother architectures Michael Snyder
2002-04-24 15:10 ` Daniel Jacobowitz
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=3CAA274A.C0170CF@redhat.com \
--to=msnyder@redhat.com \
--cc=drow@mvista.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