qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2][v3]  correct core dump format
@ 2011-02-13  2:22 Laurent Vivier
  2011-02-13  2:22 ` [Qemu-devel] [PATCH 1/2] linux-user: Define target alignment size Laurent Vivier
  2011-02-13  2:22 ` [Qemu-devel] [PATCH 2/2] linux-user: correct core dump format Laurent Vivier
  0 siblings, 2 replies; 6+ messages in thread
From: Laurent Vivier @ 2011-02-13  2:22 UTC (permalink / raw)
  To: Riku Voipio; +Cc: qemu-devel

This is the v3 of my patch correcting the core dump format.

It introduces a new parameter of the target: the datatype alignment size.

Targets like i386, mips or ppc align (short, int, long, long long) on
(2, 4, 4, 8), target like x86_64 aligns on (2, 4, 8, 8)

but arm aligns on (2, 4, 4, 4) and m68k (680x0) on (2, 2, 2, 2).

And this knowledge is needed to correctly generate a core dump.

For other targets, please update the patch with your favorite one.

[PATCH 1/2] linux-user: Define target alignment size
[PATCH 2/2] linux-user: correct core dump format

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Re: [PING 0.14] Missing patches (mostly fixes)
@ 2011-02-09 10:25 Riku Voipio
  2011-02-10 23:07 ` [Qemu-devel] [PATCH 2/2] linux-user: correct core dump format Laurent Vivier
  0 siblings, 1 reply; 6+ messages in thread
From: Riku Voipio @ 2011-02-09 10:25 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: aliguori, riku.voipio, qemu-devel

> >Actually that patch is not ok. The issues you fix on m68k appear
> >on arm/eabi after applying your patch. bswap part appears ok, but
> >the padding is needed atleast on arm.
 
> How do you test this patch ? Do you use native gdb on ARM ? Because, for m68k, cross-compiled gdb does not work (it cannot have sizeof(prstatus_t) for m68k).

I tried both native and cross-gdb, version 7.2. Both fail with your patch applied
and work fine without it.

Before your patch, objdump (CodeSourcery cs2009q3 cross) output looks like:

-snip-
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 note0         000001bc  00000000  00000000  000000d4  2**0
                  CONTENTS, READONLY
  1 .reg/23968    00000048  00000000  00000000  00000130  2**2
                  CONTENTS
  2 .reg          00000048  00000000  00000000  00000130  2**2
                  CONTENTS
  3 .auxv         00000070  00000000  00000000  00000220  2**2
                  CONTENTS
  4 load1         00000000  00008000  00000000  00001000  2**12
                  ALLOC, READONLY, CODE
-snip-

after:

-snip-
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 note0         000001bc  00000000  00000000  000000d4  2**0
                  CONTENTS, READONLY
  1 .auxv         00000070  00000000  00000000  00000220  2**2
                  CONTENTS
  2 load1         00000000  00008000  00000000  00001000  2**12
                  ALLOC, READONLY, CODE
                  CONTENTS, ALLOC, LOAD
-snip-

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-13 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-13  2:22 [Qemu-devel] [PATCH 0/2][v3] correct core dump format Laurent Vivier
2011-02-13  2:22 ` [Qemu-devel] [PATCH 1/2] linux-user: Define target alignment size Laurent Vivier
2011-02-13  8:24   ` Blue Swirl
2011-02-13 17:12     ` Laurent Vivier
2011-02-13  2:22 ` [Qemu-devel] [PATCH 2/2] linux-user: correct core dump format Laurent Vivier
  -- strict thread matches above, loose matches on Subject: below --
2011-02-09 10:25 [Qemu-devel] Re: [PING 0.14] Missing patches (mostly fixes) Riku Voipio
2011-02-10 23:07 ` [Qemu-devel] [PATCH 2/2] linux-user: correct core dump format Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).