Re: [RFC] New GDB Port CR16

Yao Qi
2012-08-30T05:14:14Z

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