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

AKASHI Takahiro takahiro.akashi at linaro.org
Wed Oct 30 22:21:51 EDT 2013


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.

-Takahiro AKASHI



More information about the linux-arm-kernel mailing list