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: [RFC] New GDB Port CR16


On 08/30/2012 12:49 PM, Kaushik Phatak wrote:
I have another cr16-tdep.c file (might call it cr16-linux-tdep.c) that would
work with the kernel port. They have slightly different register set and use
different breakpoint instruction. I am still not sure how to go about that part.

We've handled different breakpoint instructions in other ports, and you can follow the similar way for your port.


You need a 'struct gdbarch_tdep' defined in ${arch}-tdep.h, with a field 'breakpoint', for example, which points to the exact breakpoint instruction you'll use.

Set field 'breakpoint' in ${arch}-linux-tdep.c:${arch}_uclinux_init_abi according to some ELF header or attributes.

Return correct breakpoint instruction in ${arch}_breakpoint_from_pc.

Set ${arch} to 'tic6x' above, you'll see the example in details.

With respect to different register sets, you may have to use 'target description' feature in GDB.

--
Yao


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