From: "H.J. Lu" <hongjiu.lu@intel.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GDB <gdb-patches@sourceware.org>
Subject: Re: PATCH: Enable x86 XML target descriptions
Date: Wed, 17 Feb 2010 14:59:00 -0000 [thread overview]
Message-ID: <20100217145820.GA20676@lucon.org> (raw)
In-Reply-To: <20100210200303.GA19632@lucon.org>
On Wed, Feb 10, 2010 at 12:03:03PM -0800, H.J. Lu wrote:
> Hi,
>
> This patch enables x86 XML target descriptions. I used
> i386_linux_init_orig_eax to support the old gdbserver which doesn't
> have XML target descriptions.
>
> The register description processing is handled in i386_gdbarch_init
> for 32bit/64bit as well as all ABIs to avoid code duplication and
> unnecessary complexity.
>
> OK to install?
>
> BTW, I have a followup patch to support al, ax and eax pseudo registers.
>
> Thanks.
>
>
> H.J.
> ----
> gdb/
>
> 2010-02-10 H.J. Lu <hongjiu.lu@intel.com>
>
> * amd64-linux-nat.c (_initialize_amd64_linux_nat): Set
> to_read_description to i386_linux_read_description.
> * i386-linux-nat.c (_initialize_i386_linux_nat): Likewise.
>
> * amd64-linux-tdep.c (amd64_linux_register_name): Removed.
> (amd64_linux_register_type): Likewise.
> (amd64_linux_init_abi): Don't call set_gdbarch_num_regs,
> set_gdbarch_register_name nor set_gdbarch_register_type. Call
> i386_linux_init_orig_eax and set_gdbarch_core_read_description.
>
> * amd64-linux-tdep.h: Include "i386-linux-tdep.h".
>
> * amd64-tdep.c (amd64_register_names): Make it global.
> (amd64_register_name): Removed.
> (amd64_register_type): Likewise.
> (amd64_init_abi): Don't call set_gdbarch_num_regs,
> set_gdbarch_register_name nor set_gdbarch_register_type.
>
> * amd64-tdep.h (amd64_register_names): New.
>
> * i386-linux-tdep.c: Include "amd64-tdep.h" and
> * "amd64-linux-tdep.h" instead "i386-tdep.h" and
> "i386-linux-tdep.h". Include features/i386/i386-linux.c and
> features/i386/amd64-linux.c.
> (i386_linux_register_name): Support BFD64.
> (i386_linux_register_type): New.
> (i386_linux_init_orig_eax): Likewise.
> (i386_linux_core_read_description): Likewise.
> (i386_linux_read_description): Likewise.
> (i386_linux_init_abi): Don't call set_gdbarch_num_regs nor
> set_gdbarch_register_name. Call i386_linux_init_orig_eax and
> set_gdbarch_core_read_description.
> (_initialize_i386_linux_tdep): Call initialize_tdesc_i386_linux
> and initialize_tdesc_x86_64_linux.
>
> * i386-linux-tdep.h (i386_linux_core_read_description): New.
> (i386_linux_read_description): Likewise.
> (i386_linux_init_orig_eax): Likewise.
>
> * i386-tdep.c: Include "amd64-tdep.h" instead of "i386-tdep.h".
> Include features/i386/i386.c and features/i386/amd64.c.
> (i386_register_names): Make it const.
> (i386_mmx_names): Likewise.
> (i386_num_register_names): Removed.
> (i386_register_name): Likewise.
> (i386_eflags_type): Likewise.
> (i386_mxcsr_type): Likewise.
> (i386_sse_type): Likewise.
> (i386_register_type): Likewise.
> (i387_ext_type): Call tdesc_find_type instead of arch_float_type.
> (i386_pseudo_register_name): New.
> (i386_pseudo_register_type): Likewise.
> (i386_mmx_type): Make it static.
> (i386_gdbarch_init): Support both 32bit and 64bit x86 target
> descriptions. Don't call set_gdbarch_register_name nor
> set_gdbarch_register_type. Call set_tdesc_pseudo_register_type,
> set_tdesc_pseudo_register_name and tdesc_use_registers.
> (_initialize_i386_tdep): Call initialize_tdesc_i386 and
> initialize_tdesc_x86_64.
>
> * i386-tdep.h (gdbarch_tdep): Remove i386_eflags_type,
> i386_mxcsr_type and i386_sse_type.
> (i386_eflags_type): Removed.
> (i386_mxcsr_type): Likewise.
> (i386_mmx_type): Likewise.
> (i386_sse_type): Likewise.
> (i386_register_name): Likewise.
>
> * regformats/i386/i386-linux.dat: Generated.
> * regformats/i386/i386.dat: Likewise.
> * regformats/i386/amd64-linux.dat: Likewise.
> * regformats/i386/amd64.dat: Likewise.
>
> * regformats/reg-i386-linux.dat: Removed.
> * regformats/reg-i386.dat: Likewise.
> * regformats/reg-x86-64-linux.dat: Likewise.
> * regformats/reg-x86-64.dat: Likewise.
>
> gdb/gdbserver/
>
> 2010-02-10 H.J. Lu <hongjiu.lu@intel.com>
>
> * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
> reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
> i386-linux.c and amd64-linux.c.
> (reg-i386.o): Removed.
> (reg-i386.c): Likewise.
> (reg-i386-linux.o): Likewise.
> (reg-i386-linux.c): Likewise.
> (reg-x86-64.o): Likewise.
> (reg-x86-64.c): Likewise.
> (reg-x86-64-linux.o): Likewise.
> (reg-x86-64-linux.c): Likewise.
> (i386.o): New.
> (i386.c): Likewise.
> (i386-linux.o): Likewise.
> (i386-linux.c): Likewise.
> (amd64.o): Likewise.
> (amd64.c): Likewise.
> (amd64-linux.o): Likewise.
> (amd64-linux.c): Likewise.
>
> * configure.srv (srv_i386_regobj): New.
> (srv_i386_linux_regobj): Likewise.
> (srv_amd64_regobj): Likewise.
> (srv_amd64_linux_regobj): Likewise.
> (srv_i386_32bit_xmlfiles): Likewise.
> (srv_i386_64bit_xmlfiles): Likewise.
> (srv_i386_xmlfiles): Likewise.
> (srv_amd64_xmlfiles): Likewise.
> (srv_i386_linux_xmlfiles): Likewise.
> (srv_amd64_linux_xmlfiles): Likewise.
> (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
> srv_xmlfiles to $srv_i386_xmlfiles.
> (i[34567]86-*-mingw32ce*): Likewise.
> (i[34567]86-*-mingw*): Likewise.
> (i[34567]86-*-nto*): Likewise.
> (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
> and $srv_amd64_linux_regobj. Set srv_xmlfiles to
> $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
> (x86_64-*-linux*): Likewise.
>
> * linux-x86-low.c (init_registers_x86_64_linux): Removed.
> (init_registers_amd64_linux): New.
> (x86_arch_setup): Replace init_registers_x86_64_linux with
> init_registers_amd64_linux.
>
Any objections to enable XML target descriptions for x86? Any comments?
Thanks.
H.J.
next prev parent reply other threads:[~2010-02-17 14:59 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-10 20:03 H.J. Lu
2010-02-17 14:59 ` H.J. Lu [this message]
2010-02-17 15:23 ` Mark Kettenis
2010-02-17 15:42 ` H.J. Lu
2010-02-17 15:46 ` Daniel Jacobowitz
2010-02-17 16:19 ` Mark Kettenis
2010-02-18 5:44 ` H.J. Lu
2010-02-18 15:37 ` H.J. Lu
2010-02-18 23:01 ` H.J. Lu
2010-02-22 13:42 ` Mark Kettenis
2010-02-22 14:17 ` H.J. Lu
2010-02-22 15:01 ` Mark Kettenis
2010-02-22 15:27 ` H.J. Lu
2010-02-22 15:30 ` Daniel Jacobowitz
2010-02-22 15:39 ` H.J. Lu
2010-02-28 20:30 ` Mark Kettenis
2010-02-28 20:58 ` H.J. Lu
2010-02-28 22:23 ` Daniel Jacobowitz
2010-02-22 14:41 ` Daniel Jacobowitz
2010-02-22 15:34 ` H.J. Lu
2010-02-22 15:52 ` Daniel Jacobowitz
2010-02-22 15:58 ` H.J. Lu
2010-02-22 16:10 ` Daniel Jacobowitz
2010-02-22 16:58 ` Mark Kettenis
2010-02-22 17:03 ` Daniel Jacobowitz
2010-02-22 19:52 ` Mark Kettenis
2010-02-22 21:06 ` H.J. Lu
2010-02-22 21:31 ` Mark Kettenis
2010-02-22 21:41 ` H.J. Lu
2010-02-22 22:05 ` H. Peter Anvin
2010-02-22 22:07 ` H.J. Lu
2010-02-22 22:15 ` H. Peter Anvin
2010-02-22 22:21 ` H.J. Lu
2010-02-28 20:12 ` Mark Kettenis
2010-02-22 21:04 ` H.J. Lu
2010-02-28 21:16 ` H.J. Lu
2010-03-01 14:49 ` Mark Kettenis
2010-03-01 17:07 ` Daniel Jacobowitz
2010-03-01 17:09 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100217145820.GA20676@lucon.org \
--to=hongjiu.lu@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox