Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: Fix 32bit coredump read on Linux/AVX
@ 2010-04-20  3:22 H.J. Lu
  2010-04-20 18:43 ` H.J. Lu
  0 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2010-04-20  3:22 UTC (permalink / raw)
  To: GDB

Hi,

This patch:

http://sourceware.org/ml/gdb-patches/2010-04/msg00276.html

breaks 32bit coredump read on Linux/AVX since we only dump .reg and
.reg-xstate sections on AVX. But i386_linux_core_read_description
checks .reg2 and .reg-xfp sections first. Since there are no
.reg2 and .reg-xfp sections, NULL is returned and SSE target is used.
This patch changes the section check order to .reg-xstate, .reg-xfp,
.reg2.  OK to install?

Thanks.


H.J.
---
2010-04-19  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-linux-tdep.c (amd64_linux_core_read_description): Always
	use xcr0 from i386_linux_core_read_xcr0.

	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Check .reg-xfp
	and .reg2 sections for SSE and MMX.
	(i386_linux_core_read_description): Always use xcr0 from
	i386_linux_core_read_xcr0.

diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index f249d5d..e66c08e 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1269,14 +1269,9 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
 				  struct target_ops *target,
 				  bfd *abfd)
 {
-  asection *section = bfd_get_section_by_name (abfd, ".reg2");
-  uint64_t xcr0;
-
-  if (section == NULL)
-    return NULL;
-
   /* Linux/x86-64.  */
-  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
+  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
+  gdb_assert (xcr0 != 0);
   if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
     return tdesc_amd64_avx_linux;
   else
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 5952153..750e039 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -610,8 +610,12 @@ i386_linux_core_read_xcr0 (struct gdbarch *gdbarch,
 	  xcr0 = bfd_get_64 (abfd, contents);
 	}
     }
-  else
+  else if (bfd_get_section_by_name (abfd, ".reg-xfp") != NULL)
     xcr0 = I386_XSTATE_SSE_MASK;
+  else if (bfd_get_section_by_name (abfd, ".reg2") != NULL)
+    xcr0 = I386_XSTATE_X87_MASK;
+  else
+    xcr0 = 0;
 
   return xcr0;
 }
@@ -623,22 +627,20 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
 				  struct target_ops *target,
 				  bfd *abfd)
 {
-  asection *section = bfd_get_section_by_name (abfd, ".reg2");
-  uint64_t xcr0;
-
-  if (section == NULL)
-    return NULL;
-
-  section = bfd_get_section_by_name (abfd, ".reg-xfp");
-  if (section == NULL)
-    return tdesc_i386_mmx_linux;
+  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
 
   /* Linux/i386.  */
-  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
-  if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
-    return tdesc_i386_avx_linux;
-  else
-    return tdesc_i386_linux;
+  switch ((xcr0 & I386_XSTATE_AVX_MASK))
+    {
+    case I386_XSTATE_AVX_MASK:
+      return tdesc_i386_avx_linux;
+    case I386_XSTATE_SSE_MASK:
+      return tdesc_i386_linux;
+    case I386_XSTATE_X87_MASK:
+      return tdesc_i386_mmx_linux;
+    default:
+      return NULL;
+    }
 }
 
 static void


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

* Re: PATCH: Fix 32bit coredump read on Linux/AVX
  2010-04-20  3:22 PATCH: Fix 32bit coredump read on Linux/AVX H.J. Lu
@ 2010-04-20 18:43 ` H.J. Lu
  2010-04-21 14:32   ` H.J. Lu
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: H.J. Lu @ 2010-04-20 18:43 UTC (permalink / raw)
  To: GDB

On Mon, Apr 19, 2010 at 08:22:34PM -0700, H.J. Lu wrote:
> Hi,
> 
> This patch:
> 
> http://sourceware.org/ml/gdb-patches/2010-04/msg00276.html
> 
> breaks 32bit coredump read on Linux/AVX since we only dump .reg and
> .reg-xstate sections on AVX. But i386_linux_core_read_description
> checks .reg2 and .reg-xfp sections first. Since there are no
> .reg2 and .reg-xfp sections, NULL is returned and SSE target is used.
> This patch changes the section check order to .reg-xstate, .reg-xfp,
> .reg2.  OK to install?
> 
> Thanks.
> 

.reg2 section has x87 regiters on i386 and SSE registers on amd64.
Here is the updated patch to properly handle it.  OK to install?

Thanks.


H.J.
--
2010-04-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR corefiles/11523
	* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
	XCR0 first.

	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
	there is no .reg-xstate section.
	(i386_linux_core_read_description): Check XCR0 first.

diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index f249d5d..1f7a052 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1269,18 +1269,23 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
 				  struct target_ops *target,
 				  bfd *abfd)
 {
-  asection *section = bfd_get_section_by_name (abfd, ".reg2");
-  uint64_t xcr0;
-
-  if (section == NULL)
-    return NULL;
-
   /* Linux/x86-64.  */
-  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
-  if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
-    return tdesc_amd64_avx_linux;
-  else
+  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
+  switch ((xcr0 & I386_XSTATE_AVX_MASK))
+    {
+    case I386_XSTATE_AVX_MASK:
+      return tdesc_amd64_avx_linux;
+      return tdesc_i386_avx_linux;
+    case I386_XSTATE_SSE_MASK:
+      return tdesc_amd64_linux;
+    default:
+      break;
+    }
+
+  if (bfd_get_section_by_name (abfd, ".reg2") != NULL)
     return tdesc_amd64_linux;
+  else
+    return NULL;
 }
 
 static void
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 5952153..ee7c23f 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -611,7 +611,7 @@ i386_linux_core_read_xcr0 (struct gdbarch *gdbarch,
 	}
     }
   else
-    xcr0 = I386_XSTATE_SSE_MASK;
+    xcr0 = 0;
 
   return xcr0;
 }
@@ -623,22 +623,26 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
 				  struct target_ops *target,
 				  bfd *abfd)
 {
-  asection *section = bfd_get_section_by_name (abfd, ".reg2");
-  uint64_t xcr0;
-
-  if (section == NULL)
-    return NULL;
+  /* Linux/i386.  */
+  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
+  switch ((xcr0 & I386_XSTATE_AVX_MASK))
+    {
+    case I386_XSTATE_AVX_MASK:
+      return tdesc_i386_avx_linux;
+    case I386_XSTATE_SSE_MASK:
+      return tdesc_i386_linux;
+    case I386_XSTATE_X87_MASK:
+      return tdesc_i386_mmx_linux;
+    default:
+      break;
+    }
 
-  section = bfd_get_section_by_name (abfd, ".reg-xfp");
-  if (section == NULL)
+  if (bfd_get_section_by_name (abfd, ".reg-xfp") != NULL)
+    return tdesc_i386_linux;
+  else if (bfd_get_section_by_name (abfd, ".reg2") != NULL)
     return tdesc_i386_mmx_linux;
-
-  /* Linux/i386.  */
-  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
-  if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
-    return tdesc_i386_avx_linux;
   else
-    return tdesc_i386_linux;
+    return NULL;
 }
 
 static void


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

* Re: PATCH: Fix 32bit coredump read on Linux/AVX
  2010-04-20 18:43 ` H.J. Lu
@ 2010-04-21 14:32   ` H.J. Lu
  2010-04-21 19:38   ` Mark Kettenis
  2010-04-21 20:18   ` H.J. Lu
  2 siblings, 0 replies; 6+ messages in thread
From: H.J. Lu @ 2010-04-21 14:32 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: GDB

On Tue, Apr 20, 2010 at 11:43 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> On Mon, Apr 19, 2010 at 08:22:34PM -0700, H.J. Lu wrote:
>> Hi,
>>
>> This patch:
>>
>> http://sourceware.org/ml/gdb-patches/2010-04/msg00276.html
>>
>> breaks 32bit coredump read on Linux/AVX since we only dump .reg and
>> .reg-xstate sections on AVX. But i386_linux_core_read_description
>> checks .reg2 and .reg-xfp sections first. Since there are no
>> .reg2 and .reg-xfp sections, NULL is returned and SSE target is used.
>> This patch changes the section check order to .reg-xstate, .reg-xfp,
>> .reg2.  OK to install?
>>
>> Thanks.
>>
>
> .reg2 section has x87 regiters on i386 and SSE registers on amd64.
> Here is the updated patch to properly handle it.  OK to install?
>
> Thanks.
>
>
> H.J.
> --
> 2010-04-20  H.J. Lu  <hongjiu.lu@intel.com>
>
>        PR corefiles/11523
>        * amd64-linux-tdep.c (amd64_linux_core_read_description): Check
>        XCR0 first.
>
>        * i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
>        there is no .reg-xstate section.
>        (i386_linux_core_read_description): Check XCR0 first.
>

Any suggestions to this patch? Mark, can you comment on this?

Thanks.


-- 
H.J.


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

* Re: PATCH: Fix 32bit coredump read on Linux/AVX
  2010-04-20 18:43 ` H.J. Lu
  2010-04-21 14:32   ` H.J. Lu
@ 2010-04-21 19:38   ` Mark Kettenis
  2010-04-21 20:18   ` H.J. Lu
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Kettenis @ 2010-04-21 19:38 UTC (permalink / raw)
  To: hjl.tools; +Cc: gdb-patches

> Date: Tue, 20 Apr 2010 11:43:39 -0700
> From: "H.J. Lu" <hongjiu.lu@intel.com>
> 
> On Mon, Apr 19, 2010 at 08:22:34PM -0700, H.J. Lu wrote:
> > Hi,
> > 
> > This patch:
> > 
> > http://sourceware.org/ml/gdb-patches/2010-04/msg00276.html

Sorry about that.  I thought that you had tested that diff.

> > breaks 32bit coredump read on Linux/AVX since we only dump .reg and
> > .reg-xstate sections on AVX. But i386_linux_core_read_description
> > checks .reg2 and .reg-xfp sections first. Since there are no
> > .reg2 and .reg-xfp sections, NULL is returned and SSE target is used.
> > This patch changes the section check order to .reg-xstate, .reg-xfp,
> > .reg2.  OK to install?
> > 
> > Thanks.
> > 
> 
> .reg2 section has x87 regiters on i386 and SSE registers on amd64.
> Here is the updated patch to properly handle it.  OK to install?

Not quite.

> 2010-04-20  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR corefiles/11523
> 	* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
> 	XCR0 first.
> 
> 	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
> 	there is no .reg-xstate section.
> 	(i386_linux_core_read_description): Check XCR0 first.
> 
> diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
> index f249d5d..1f7a052 100644
> --- a/gdb/amd64-linux-tdep.c
> +++ b/gdb/amd64-linux-tdep.c
> @@ -1269,18 +1269,23 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
>  				  struct target_ops *target,
>  				  bfd *abfd)
>  {
> -  asection *section = bfd_get_section_by_name (abfd, ".reg2");
> -  uint64_t xcr0;
> -
> -  if (section == NULL)
> -    return NULL;
> -
>    /* Linux/x86-64.  */
> -  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
> -  if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
> -    return tdesc_amd64_avx_linux;
> -  else
> +  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
> +  switch ((xcr0 & I386_XSTATE_AVX_MASK))
> +    {
> +    case I386_XSTATE_AVX_MASK:
> +      return tdesc_amd64_avx_linux;
> +      return tdesc_i386_avx_linux;

There's a duplicate return statement there.

> +    case I386_XSTATE_SSE_MASK:
> +      return tdesc_amd64_linux;
> +    default:
> +      break;
> +    }
> +
> +  if (bfd_get_section_by_name (abfd, ".reg2") != NULL)
>      return tdesc_amd64_linux;
> +  else
> +    return NULL;

I think we should always return tdesc_amd64_linux here.  That is the
minimal target description for amd64.

> diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
> index 5952153..ee7c23f 100644
> --- a/gdb/i386-linux-tdep.c
> +++ b/gdb/i386-linux-tdep.c
> @@ -611,7 +611,7 @@ i386_linux_core_read_xcr0 (struct gdbarch *gdbarch,
>  	}
>      }
>    else
> -    xcr0 = I386_XSTATE_SSE_MASK;
> +    xcr0 = 0;
>  
>    return xcr0;
>  }
> @@ -623,22 +623,26 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
>  				  struct target_ops *target,
>  				  bfd *abfd)
>  {
> -  asection *section = bfd_get_section_by_name (abfd, ".reg2");
> -  uint64_t xcr0;
> -
> -  if (section == NULL)
> -    return NULL;
> +  /* Linux/i386.  */
> +  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
> +  switch ((xcr0 & I386_XSTATE_AVX_MASK))
> +    {
> +    case I386_XSTATE_AVX_MASK:
> +      return tdesc_i386_avx_linux;
> +    case I386_XSTATE_SSE_MASK:
> +      return tdesc_i386_linux;
> +    case I386_XSTATE_X87_MASK:
> +      return tdesc_i386_mmx_linux;
> +    default:
> +      break;
> +    }

This is fine, however,

> -  section = bfd_get_section_by_name (abfd, ".reg-xfp");
> -  if (section == NULL)
> +  if (bfd_get_section_by_name (abfd, ".reg-xfp") != NULL)
> +    return tdesc_i386_linux;
> +  else if (bfd_get_section_by_name (abfd, ".reg2") != NULL)
>      return tdesc_i386_mmx_linux;
> -
> -  /* Linux/i386.  */
> -  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
> -  if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
> -    return tdesc_i386_avx_linux;
>    else
> -    return tdesc_i386_linux;
> +    return NULL;

I think we should return tdesc_i386_linux if ".reg-xfp" is found,
otherwise return tdesc_i386_mmx_linux.


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

* Re: PATCH: Fix 32bit coredump read on Linux/AVX
  2010-04-20 18:43 ` H.J. Lu
  2010-04-21 14:32   ` H.J. Lu
  2010-04-21 19:38   ` Mark Kettenis
@ 2010-04-21 20:18   ` H.J. Lu
  2010-04-21 20:24     ` Mark Kettenis
  2 siblings, 1 reply; 6+ messages in thread
From: H.J. Lu @ 2010-04-21 20:18 UTC (permalink / raw)
  To: GDB

On Tue, Apr 20, 2010 at 11:43:39AM -0700, H.J. Lu wrote:
> On Mon, Apr 19, 2010 at 08:22:34PM -0700, H.J. Lu wrote:
> > Hi,
> > 
> > This patch:
> > 
> > http://sourceware.org/ml/gdb-patches/2010-04/msg00276.html
> > 
> > breaks 32bit coredump read on Linux/AVX since we only dump .reg and
> > .reg-xstate sections on AVX. But i386_linux_core_read_description
> > checks .reg2 and .reg-xfp sections first. Since there are no
> > .reg2 and .reg-xfp sections, NULL is returned and SSE target is used.
> > This patch changes the section check order to .reg-xstate, .reg-xfp,
> > .reg2.  OK to install?
> > 
> > Thanks.
> > 
> 
> .reg2 section has x87 regiters on i386 and SSE registers on amd64.
> Here is the updated patch to properly handle it.  OK to install?
> 
> Thanks.
> 
> 
> H.J.
> --
> 2010-04-20  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR corefiles/11523
> 	* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
> 	XCR0 first.
> 
> 	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
> 	there is no .reg-xstate section.
> 	(i386_linux_core_read_description): Check XCR0 first.
> 

This is the version I am checking in.


H.J.
---
2010-04-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR corefiles/11523
	* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
	XCR0 first.

	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
	there is no .reg-xstate section.
	(i386_linux_core_read_description): Check XCR0 first.

diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index f249d5d..7376ba7 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1269,18 +1269,15 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
 				  struct target_ops *target,
 				  bfd *abfd)
 {
-  asection *section = bfd_get_section_by_name (abfd, ".reg2");
-  uint64_t xcr0;
-
-  if (section == NULL)
-    return NULL;
-
   /* Linux/x86-64.  */
-  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
-  if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
-    return tdesc_amd64_avx_linux;
-  else
-    return tdesc_amd64_linux;
+  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
+  switch ((xcr0 & I386_XSTATE_AVX_MASK))
+    {
+    case I386_XSTATE_AVX_MASK:
+      return tdesc_amd64_avx_linux;
+    default:
+      return tdesc_amd64_linux;
+    }
 }
 
 static void
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 5952153..711a5d1 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -611,7 +611,7 @@ i386_linux_core_read_xcr0 (struct gdbarch *gdbarch,
 	}
     }
   else
-    xcr0 = I386_XSTATE_SSE_MASK;
+    xcr0 = 0;
 
   return xcr0;
 }
@@ -623,22 +623,24 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
 				  struct target_ops *target,
 				  bfd *abfd)
 {
-  asection *section = bfd_get_section_by_name (abfd, ".reg2");
-  uint64_t xcr0;
-
-  if (section == NULL)
-    return NULL;
-
-  section = bfd_get_section_by_name (abfd, ".reg-xfp");
-  if (section == NULL)
-    return tdesc_i386_mmx_linux;
-
   /* Linux/i386.  */
-  xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
-  if ((xcr0 & I386_XSTATE_AVX_MASK) == I386_XSTATE_AVX_MASK)
-    return tdesc_i386_avx_linux;
-  else
+  uint64_t xcr0 = i386_linux_core_read_xcr0 (gdbarch, target, abfd);
+  switch ((xcr0 & I386_XSTATE_AVX_MASK))
+    {
+    case I386_XSTATE_AVX_MASK:
+      return tdesc_i386_avx_linux;
+    case I386_XSTATE_SSE_MASK:
+      return tdesc_i386_linux;
+    case I386_XSTATE_X87_MASK:
+      return tdesc_i386_mmx_linux;
+    default:
+      break;
+    }
+
+  if (bfd_get_section_by_name (abfd, ".reg-xfp") != NULL)
     return tdesc_i386_linux;
+  else
+    return tdesc_i386_mmx_linux;
 }
 
 static void


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

* Re: PATCH: Fix 32bit coredump read on Linux/AVX
  2010-04-21 20:18   ` H.J. Lu
@ 2010-04-21 20:24     ` Mark Kettenis
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Kettenis @ 2010-04-21 20:24 UTC (permalink / raw)
  To: hjl.tools; +Cc: gdb-patches

> Date: Wed, 21 Apr 2010 13:18:20 -0700
> From: "H.J. Lu" <hongjiu.lu@intel.com>
> 
> On Tue, Apr 20, 2010 at 11:43:39AM -0700, H.J. Lu wrote:
> > On Mon, Apr 19, 2010 at 08:22:34PM -0700, H.J. Lu wrote:
> > > Hi,
> > > 
> > > This patch:
> > > 
> > > http://sourceware.org/ml/gdb-patches/2010-04/msg00276.html
> > > 
> > > breaks 32bit coredump read on Linux/AVX since we only dump .reg and
> > > .reg-xstate sections on AVX. But i386_linux_core_read_description
> > > checks .reg2 and .reg-xfp sections first. Since there are no
> > > .reg2 and .reg-xfp sections, NULL is returned and SSE target is used.
> > > This patch changes the section check order to .reg-xstate, .reg-xfp,
> > > .reg2.  OK to install?
> > > 
> > > Thanks.
> > > 
> > 
> > .reg2 section has x87 regiters on i386 and SSE registers on amd64.
> > Here is the updated patch to properly handle it.  OK to install?
> > 
> > Thanks.
> > 
> > 
> > H.J.
> > --
> > 2010-04-20  H.J. Lu  <hongjiu.lu@intel.com>
> > 
> > 	PR corefiles/11523
> > 	* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
> > 	XCR0 first.
> > 
> > 	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
> > 	there is no .reg-xstate section.
> > 	(i386_linux_core_read_description): Check XCR0 first.
> > 
> 
> This is the version I am checking in.

Looks good, thanks!

> 2010-04-21  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR corefiles/11523
> 	* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
> 	XCR0 first.
> 
> 	* i386-linux-tdep.c (i386_linux_core_read_xcr0): Return 0 if
> 	there is no .reg-xstate section.
> 	(i386_linux_core_read_description): Check XCR0 first.


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

end of thread, other threads:[~2010-04-21 20:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20  3:22 PATCH: Fix 32bit coredump read on Linux/AVX H.J. Lu
2010-04-20 18:43 ` H.J. Lu
2010-04-21 14:32   ` H.J. Lu
2010-04-21 19:38   ` Mark Kettenis
2010-04-21 20:18   ` H.J. Lu
2010-04-21 20:24     ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox