aboutsummaryrefslogtreecommitdiff
path: root/opcodes/m32c-asm.c
diff options
context:
space:
mode:
authorPierre Langlois <pierre.langlois@arm.com>2015-07-09 16:35:11 +0100
committerPierre Langlois <pierre.langlois@arm.com>2015-07-09 16:35:11 +0100
commit7dfa3edc033c443036d9f2a3e01120f7fb54f498 (patch)
treea6e9c35f891efd382bc8cc799374fa508a9c224e /opcodes/m32c-asm.c
parentdb634143224dc7cb985d996bed15257f5cb86b25 (diff)
downloadgdb-7dfa3edc033c443036d9f2a3e01120f7fb54f498.zip
gdb-7dfa3edc033c443036d9f2a3e01120f7fb54f498.tar.gz
gdb-7dfa3edc033c443036d9f2a3e01120f7fb54f498.tar.bz2
[AArch64] Teach prologue unwinder to terminate gracefully
Without debugging information, we have the following issue when examining a trace buffer: ~~~ ... (gdb) trace f Tracepoint 3 at 0x7fb7fc28c0 (gdb) tstart (gdb) continue ... (gdb) tstop (gdb) tfind start Register 31 is not available. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Found trace frame 0, tracepoint 3 #-1 0x0000007fb7fc28c0 in f () ... ^^^ ~~~ The reason for this is that the target's stack pointer is unavailable when examining the trace buffer. What we are seeing is due to the 'tfind' command creating a sentinel frame and unwinding it. If an exception is thrown, we are left with the sentinel frame being displayed at level #-1. The exception is thrown when the prologue unwinder tries to read the stack pointer to construct an ID for the frame. This patch fixes this by making the prologue unwinder catch NOT_AVAILABLE_ERROR exceptions when either registers or memory is unreadable and report back to the frame core code with UNWIND_UNAVAILABLE. gdb/ChangeLog: * aarch64-tdep.c (aarch64_prologue_cache) <available_p>: New field. (aarch64_make_prologue_cache_1): New function, factored out from aarch64_make_prologue_cache. Do not allocate cache. Set available_p. (aarch64_make_prologue_cache): Reimplement wrapping aarch64_make_prologue_cache_1, and swallowing NOT_AVAILABLE_ERROR. (aarch64_prologue_frame_unwind_stop_reason): New function. Return UNWIND_UNAVAILABLE if available_p is not set. (aarch64_prologue_unwind): Install it. (aarch64_prologue_this_id): Move prev_pc and prev_sp limit checks into aarch64_prologue_frame_unwind_stop_reason. Call frame_id_build_unavailable_stack if available_p is not set.
Diffstat (limited to 'opcodes/m32c-asm.c')
0 files changed, 0 insertions, 0 deletions