aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
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 /gdb/ChangeLog
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 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0cc42a3..f715fcd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,22 @@
2015-07-09 Pierre Langlois <pierre.langlois@arm.com>
+ * 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.
+
+2015-07-09 Pierre Langlois <pierre.langlois@arm.com>
+
* aarch64-tdep.c (aarch64_prologue_cache) <func, prev_pc>: New
fields.
(aarch64_scan_prologue): Set prev_pc.