From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [rfa] Add cross platform i386 corefile support
Date: Fri, 01 Aug 2003 16:32:00 -0000 [thread overview]
Message-ID: <20030801163221.GA2562@nevyn.them.org> (raw)
In-Reply-To: <3F2A94B3.5080700@redhat.com>
On Fri, Aug 01, 2003 at 12:26:27PM -0400, Andrew Cagney wrote:
> Hello,
>
> The attached does to the i386 what MichaelL recently did to x86-64 -
> make the code that reads core files work cross platform.
>
> While this change is independant of the x86-64 change, it does work
> better when combined with that.
>
> i386 native showed no regressions. A cross GDB was able to read i386
> native generated core files.
>
> Please note that gcore doesn't work cross though - problems in
> linux-proc.c. I've filed a bug report.
>
> ok?
> 6.0?
I'm not sure how cross-safe this bit is:
> +static void
> +dummy_sse_values (void)
> +{
> + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
> + /* C doesn't have a syntax for NaN's, so write it out as an array of
> + longs. */
> + static long dummy[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff };
> + static long mxcsr = 0x1f80;
> + int reg;
> +
> + for (reg = 0; reg < tdep->num_xmm_regs; reg++)
> + supply_register (XMM0_REGNUM + reg, (char *) dummy);
> + if (tdep->num_xmm_regs > 0)
> + supply_register (MXCSR_REGNUM, (char *) &mxcsr);
> +}
Won't work on a big-endian LP64 host. You've filled them with 0
instead of -1 if I remember my C promotions right.
Otherwise, I have some code to do the same thing, and it looks exactly
the same, which is a good sign :) I'm too backlogged waiting for
review of things I've already posted to realistically flush the rest of
my queue, so I'm glad to see someone else save me the trouble.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-08-01 16:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-01 16:26 Andrew Cagney
2003-08-01 16:32 ` Daniel Jacobowitz [this message]
2003-08-04 17:43 ` Andrew Cagney
2003-08-09 14:47 ` Andrew Cagney
2003-08-10 23:23 ` Mark Kettenis
2003-08-11 3:11 ` Andrew Cagney
2003-08-12 19:27 ` Andrew Cagney
2003-08-21 20:12 ` 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=20030801163221.GA2562@nevyn.them.org \
--to=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