This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Check DS segment register for x32 process


> Date: Fri, 11 May 2012 12:31:14 -0700
> From: "H.J. Lu" <hongjiu.lu@intel.com>
> 
> Hi,
> 
> This patch checks DS segment register for x32 process.  Tested on
> Linux/x86-64.  OK to install?
> 
> Thanks.
> 
> H.J.
> ---
> 	* amd64-linux-nat.c (AMD64_LINUX_X32_DS): New.
> 	(amd64_linux_read_description): Check DS segment register for
> 	x32 process.
> 
> diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
> index 3be8404..97c9a49 100644
> --- a/gdb/amd64-linux-nat.c
> +++ b/gdb/amd64-linux-nat.c

> +  if (sizeof (void *) == 4 && is_64bit && !is_x32)
> +    error (_("Can't debug 64-bit process with 32-bit GDB"));

I really think we should refuse to even build a GDB as an X32 binary.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]