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 1/3] Add sp_regnum_from_eax and pc_regnum_from_eax


On Tue, Jul 3, 2012 at 7:08 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Thu, 21 Jun 2012 11:14:52 -0700
>> From: "H.J. Lu" <hongjiu.lu@intel.com>
>>
>> Hi,
>>
>> Here are the first of the last 3 patches for x32 support in GDB.  This
>> patch maps $pc to $eip and $sp to $esp for x32.  OK to install?
>
> The pseudo register handling code is getting too complex :(.  I feel
> that hiding the set_gdbarch_pc_regnum() and set_gdbarch_sp_regnum()
> calls in i386-tdep.c isn't the right approach.  But I haven't found a
> better one yet :(.
>

One possibility is to set pc/sp to register name instead of regnum.
i386_gdbarch_init can map them to regnum after all pseudo registers
are finalized.

-- 
H.J.


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