[PATCH v3 2/4] AArch64: KGDB: Add Basic KGDB support

Vijay Kilari vijay.kilari at gmail.com
Mon Nov 4 05:53:25 EST 2013


On Thu, Oct 31, 2013 at 7:51 AM, AKASHI Takahiro
<takahiro.akashi at linaro.org> wrote:
> Hi,
>
>
> On 10/18/2013 08:07 PM, vijay.kilari at gmail.com wrote:
>>
>> From: Vijaya Kumar K <Vijaya.Kumar at caviumnetworks.com>
>>
>> diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c
>> new file mode 100644
>> index 0000000..50cef79
>> --- /dev/null
>> +++ b/arch/arm64/kernel/kgdb.c
>
>> ...
>
>> +int kgdb_arch_handle_exception(int exception_vector, int signo,
>> +                              int err_code, char *remcom_in_buffer,
>> +                              char *remcom_out_buffer,
>> +                              struct pt_regs *linux_regs)
>> +{
>> +       unsigned long addr;
>> +       char *ptr;
>> +       int err;
>> +
>> +       switch (remcom_in_buffer[0]) {
>> +       case 'D':
>> +       case 'k':
>> +       case 'c':
>> +               /*
>> +                * Packet D (Detach), k (kill) & c (Continue) requires
>> +                * to continue executing. Set pc to required address.
>> +                * Try to read optional parameter, pc unchanged if no
>> parm.
>
>
> Are you sure that there may be an option parameter even in 'D' or 'k'?
> 'D' means "detach" and 'k' means "kill", AFAIK, they don't take any
> parameters. No other architectures (except arm) handle the case
> in such way, neither.
>
right, they generally don't carry parameter. However 'D' packet can
take pid (see gdb serial protocol)
https://sourceware.org/gdb/onlinedocs/gdb/Packets.html#Packets
However in this case we are parsing packet for pc address.
I will re-send new version of patch

> -Takahiro AKASHI



More information about the linux-arm-kernel mailing list