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: [RFA 4/5] New port: CR16: gdbserver


On 01/22/2013 01:42 PM, Kaushik Phatak wrote:
> Hi Pedro,
> Thanks for your feedback.
> 
>> No, this needs to be fixed.  The .dat registers must agree with GDB's remote
>> register set.  Once that is fixed, you'll be able to put more registers
>> in the "expedite" set
> 
> I am working on these points. From what I see, my cr16_regmap needs to be
> 4-byte aligned so that ptrace calls within linux-low.c can use these without
> causing any I/O errors. The updated reg.dat file would not match in offset
> to cr16_regmap, but would match gdb.
> Some additional code would be needed to handle the padding and packing through 
> ptrace in the kernel. 

You mean additional code in gdbserver, or in the kernel?  I'd think the
former.

> This would allow the correct register number to be
> accessed which would match gdb as well as reg-cr16.dat.
> Let me know if you have any thoughts on this.

The alternative would be to go all the other way around
-- always expose the registers as pairs in the remote protocol,
and then implement the user visible non-paired registers in
GDB as pseudo registers (and hide the pairs).  IOW, your .dat
file would stay the same, and gdbserver wouldn't change.  GDB's
core cr16 register numbers would be decoupled from the RSP
register set.  It sounds a little uglier to me though.

-- 
Pedro Alves


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