PATCH: Check DS segment register for x32 process
Mark Kettenis
mark.kettenis@xs4all.nl
Fri May 11 20:25:00 GMT 2012
> 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.
More information about the Gdb-patches
mailing list