public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix Linux/i386 register set size
@ 2010-04-20 19:43 Mark Kettenis
  2010-04-20 21:45 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2010-04-20 19:43 UTC (permalink / raw)
  To: gdb-patches

Should be 68.  Confusion is probably caused by the fact that the note
size is 144, and that the amd64 register set is also 144.  The fact
that the GDB gcore produces wrong core files in the 32x64 case doesn't
help either.

Committed.


2010-04-20  Mark Kettenis  <kettenis@gnu.org>

	* i386-linux-tdep.c (i386_linux_regset_sections): Size of the
	general-purpose register set should be 68 instead of 144.
	(i386_linux_sse_regset_sections): Likewise.
	(i386_linux_avx_regset_sections): Likewise.


Index: i386-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v
retrieving revision 1.75
diff -u -p -r1.75 i386-linux-tdep.c
--- i386-linux-tdep.c	13 Apr 2010 21:07:16 -0000	1.75
+++ i386-linux-tdep.c	20 Apr 2010 19:26:04 -0000
@@ -56,21 +56,21 @@
 /* Supported register note sections.  */
 static struct core_regset_section i386_linux_regset_sections[] =
 {
-  { ".reg", 144, "general-purpose" },
+  { ".reg", 68, "general-purpose" },
   { ".reg2", 108, "floating-point" },
   { NULL, 0 }
 };
 
 static struct core_regset_section i386_linux_sse_regset_sections[] =
 {
-  { ".reg", 144, "general-purpose" },
+  { ".reg", 68, "general-purpose" },
   { ".reg-xfp", 512, "extended floating-point" },
   { NULL, 0 }
 };
 
 static struct core_regset_section i386_linux_avx_regset_sections[] =
 {
-  { ".reg", 144, "general-purpose" },
+  { ".reg", 68, "general-purpose" },
   { ".reg-xstate", I386_XSTATE_MAX_SIZE, "XSAVE extended state" },
   { NULL, 0 }
 };

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

* Re: [PATCH] Fix Linux/i386 register set size
  2010-04-20 19:43 [PATCH] Fix Linux/i386 register set size Mark Kettenis
@ 2010-04-20 21:45 ` H.J. Lu
  2010-04-22 19:43   ` Mark Kettenis
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2010-04-20 21:45 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Tue, Apr 20, 2010 at 12:42 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> Should be 68.  Confusion is probably caused by the fact that the note
> size is 144, and that the amd64 register set is also 144.  The fact
> that the GDB gcore produces wrong core files in the 32x64 case doesn't
> help either.
>
> Committed.
>
>
> 2010-04-20  Mark Kettenis  <kettenis@gnu.org>
>
>        * i386-linux-tdep.c (i386_linux_regset_sections): Size of the
>        general-purpose register set should be 68 instead of 144.
>        (i386_linux_sse_regset_sections): Likewise.
>        (i386_linux_avx_regset_sections): Likewise.
>
>

On Linux, ".reg" section is a special case. Its size is ignored.
See linux_nat_do_thread_registers for details. You can set
it to anything and it doesn't make a difference.


-- 
H.J.

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

* Re: [PATCH] Fix Linux/i386 register set size
  2010-04-20 21:45 ` H.J. Lu
@ 2010-04-22 19:43   ` Mark Kettenis
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2010-04-22 19:43 UTC (permalink / raw)
  To: hjl.tools; +Cc: gdb-patches

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

> Date: Tue, 20 Apr 2010 14:45:19 -0700
> From: "H.J. Lu" <hjl.tools@gmail.com>
> 
> On Tue, Apr 20, 2010 at 12:42 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > Should be 68.  Confusion is probably caused by the fact that the note
> > size is 144, and that the amd64 register set is also 144.  The fact
> > that the GDB gcore produces wrong core files in the 32x64 case doesn't
> > help either.
> >
> > Committed.
> >
> >
> > 2010-04-20  Mark Kettenis  <kettenis@gnu.org>
> >
> >        * i386-linux-tdep.c (i386_linux_regset_sections): Size of the
> >        general-purpose register set should be 68 instead of 144.
> >        (i386_linux_sse_regset_sections): Likewise.
> >        (i386_linux_avx_regset_sections): Likewise.
> >
> >
> 
> On Linux, ".reg" section is a special case. Its size is ignored.
> See linux_nat_do_thread_registers for details. You can set
> it to anything and it doesn't make a difference.

Right.  No excuse not the correct the mistake though.

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

end of thread, other threads:[~2010-04-22 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 19:43 [PATCH] Fix Linux/i386 register set size Mark Kettenis
2010-04-20 21:45 ` H.J. Lu
2010-04-22 19:43   ` Mark Kettenis

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 read-only IMAP folder(s) and NNTP newsgroup(s).