From: Daniel Jacobowitz <drow@mvista.com>
To: Kris Warkentin <kewarken@qnx.com>
Cc: gdb@sources.redhat.com
Subject: Re: long long considered harmful?
Date: Wed, 23 Apr 2003 22:11:00 -0000 [thread overview]
Message-ID: <20030423221137.GA6244@nevyn.them.org> (raw)
In-Reply-To: <000b01c309e5$098a5f90$0202040a@catdog>
On Wed, Apr 23, 2003 at 06:09:40PM -0400, Kris Warkentin wrote:
> > I'd have to see exactly what you meant, but probably not. These things
> > have to be an exact size, right? Barring wackiness like the 32-bit
> > char platforms, which I shouldn't have brought into this. So if you
> > run on a host with 64-bit "int", it will be wrong.
>
> It just has to be AT LEAST a certain size. If I have:
>
> typedef struct x86_cpu_registers
> {
> unsigned edi, esi, ebp, exx, ebx, edx, ecx, eax;
> unsigned eip, cs, efl;
> unsigned esp, ss;
> } X86_CPU_REGISTERS;
>
> typedef union _debug_gregs
> {
> ARM_CPU_REGISTERS arm;
> ...
> X86_CPU_REGISTERS x86;
> qnx_reg64 padding[1024];
> } nto_gregset_t;
>
> Then the padding guarantees a minimum size. If I then calculate edi, esi,
> etc.
> using char offsets, the way the compiler creates the structure is completely
> irrelevant. The only reason for the structure is to maintain visible
> compatability with our system headers.
At that point, the entire contents of this header (for GDB's purposes)
could be:
typedef union _debug_gregs
{
qnx_reg64 padding[1024];
};
Right?
If so, honestly I don't see the point of including it in GDB at all.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-04-23 22:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-22 17:39 Kris Warkentin
2003-04-22 17:45 ` Daniel Jacobowitz
2003-04-22 18:08 ` Kris Warkentin
2003-04-22 18:21 ` Daniel Jacobowitz
2003-04-22 18:41 ` Kris Warkentin
2003-04-22 19:31 ` Daniel Jacobowitz
2003-04-22 19:12 ` Kris Warkentin
2003-04-22 19:25 ` Kris Warkentin
2003-04-22 19:30 ` Daniel Jacobowitz
2003-04-23 13:39 ` Kris Warkentin
2003-04-23 21:17 ` Daniel Jacobowitz
2003-04-23 21:23 ` Kris Warkentin
2003-04-23 21:44 ` Kris Warkentin
2003-04-23 21:47 ` Daniel Jacobowitz
2003-04-23 22:09 ` Kris Warkentin
2003-04-23 22:11 ` Daniel Jacobowitz [this message]
2003-04-23 22:17 ` Kris Warkentin
2003-04-24 21:05 ` Andrew Cagney
2003-04-24 23:51 ` Kris Warkentin
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=20030423221137.GA6244@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb@sources.redhat.com \
--cc=kewarken@qnx.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