RE: [RFA 4/5] New port: CR16: gdbserver

Kaushik Phatak
2013-01-23T14:04:20Z

>> Yes, I agree. Disturbing the .dat file is causing issues in the
>> remote protocol.
>What issues? Can you be more specific?

The kernel defines only 15 registers, r0 to r11 as pairs, (total 6) then
the other 9 32-bit registers r12, r13 and special registers ra,pc,usp,psr,
pad,intbase, and r0r1_orig.
If I want the .dat to match the register numbers in gdb, then my .dat would
look like this,
{{{
name:cr16
expedite:psr,pc,usp
16:r0
16:r1
16:r2
16:r3
16:r4
16:r5
16:r6
16:r7
16:r8
16:r9
16:r10
16:r11
32:r12
32:r13
32:ra
32:psr
32:pc
32:r0r1_orig
32:intbase
32:usp
32:cfg
}}}

This is consistent with gdb. However, this way my register count goes
to 21 which is way above what my kernel can handle causing
it to error out. I could add special to handle this at kernel, but it
will slow it down quite a bit. Additionally, the ptrace in kernel gets
its data from a 'get_reg' function which accepts specific regnums and
it will tricky to disturb this.

Regards,
Kaushik