Fix KGDB backtrace on ARM
authorwma <wma@FreeBSD.org>
Wed, 20 Apr 2016 17:58:13 +0000 (17:58 +0000)
committerwma <wma@FreeBSD.org>
Wed, 20 Apr 2016 17:58:13 +0000 (17:58 +0000)
commitdc8641835532430d191452e0ceeb8e5f5fca65bd
treebcc9076b944062771b44adf7b9d04d207d8b83bf
parent9aa0848a7e49b971afc93230a51b4867423b3fbd
Fix KGDB backtrace on ARM

Modify trapframe decoding to properly analyze trapframe.

Provide method for fixup_pc. It happens, that in some kernel
functions, the GDB stack frame decoder cannot determine both
func name and frame size. This is because these functions
either contain invalid instruction, or their format does
not match standard schema. Detect that scenarios and move
PC accordingly to jump into known function schema, which
GDB is able to parse.

Obtained from:         Semihalf
Sponsored by:          Juniper Networks
Reviewed by:           kib, zbb
Differential Revision: https://reviews.freebsd.org/D5976
contrib/gdb/gdb/arm-tdep.c
contrib/gdb/gdb/frame.c
contrib/gdb/gdb/frame.h
gnu/usr.bin/gdb/kgdb/kgdb.h
gnu/usr.bin/gdb/kgdb/main.c
gnu/usr.bin/gdb/kgdb/trgt_arm.c