summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-04-19 11:57:27 +0100
committerYao Qi <yao.qi@linaro.org>2018-03-13 14:31:59 +0000
commite911bc5d3454287ee48c7263ba5ff52d48d967bc (patch)
tree1f3c9df84f8b616889e4bc1b090f79f1ec8102b7
parenta11bf1279d0663741015f64238b3394081d463fb (diff)
downloadbinutils-gdb-e911bc5d3454287ee48c7263ba5ff52d48d967bc.tar.gz
Throw exception in aarch64 unwinder
gdb: 2017-07-31 Yao Qi <yao.qi@linaro.org> * aarch64-tdep.c (aarch64_prologue_cache) <available_p>: Remove. (aarch64_make_prologue_cache_1): Update. (aarch64_make_prologue_cache): Don't catch exception. (aarch64_prologue_frame_unwind_stop_reason): Don't check cache->available_p. (aarch64_prologue_this_id): Likewise. (aarch64_make_stub_cache): Don't catch exceptions. (aarch64_stub_frame_unwind_stop_reason): Don't check cache->available_p. (aarch64_stub_this_id): Likewise.
-rw-r--r--gdb/aarch64-tdep.c48
1 files changed, 6 insertions, 42 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index f08945ea071..3d9cedca558 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -170,9 +170,6 @@ struct aarch64_prologue_cache
to identify this frame. */
CORE_ADDR prev_sp;
- /* Is the target available to read from? */
- int available_p;
-
/* The frame base for this frame is just prev_sp - frame size.
FRAMESIZE is the distance from the frame pointer to the
initial stack pointer. */
@@ -731,8 +728,6 @@ aarch64_make_prologue_cache_1 (struct frame_info *this_frame,
cache->saved_regs[reg].addr += cache->prev_sp;
cache->func = get_frame_func (this_frame);
-
- cache->available_p = 1;
}
/* Allocate and fill in *THIS_CACHE with information about the prologue of
@@ -752,16 +747,7 @@ aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache)
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
*this_cache = cache;
- TRY
- {
- aarch64_make_prologue_cache_1 (this_frame, cache);
- }
- CATCH (ex, RETURN_MASK_ERROR)
- {
- if (ex.error != NOT_AVAILABLE_ERROR)
- throw_exception (ex);
- }
- END_CATCH
+ aarch64_make_prologue_cache_1 (this_frame, cache);
return cache;
}
@@ -775,9 +761,6 @@ aarch64_prologue_frame_unwind_stop_reason (struct frame_info *this_frame,
struct aarch64_prologue_cache *cache
= aarch64_make_prologue_cache (this_frame, this_cache);
- if (!cache->available_p)
- return UNWIND_UNAVAILABLE;
-
/* Halt the backtrace at "_start". */
if (cache->prev_pc <= gdbarch_tdep (get_frame_arch (this_frame))->lowest_pc)
return UNWIND_OUTERMOST;
@@ -799,10 +782,7 @@ aarch64_prologue_this_id (struct frame_info *this_frame,
struct aarch64_prologue_cache *cache
= aarch64_make_prologue_cache (this_frame, this_cache);
- if (!cache->available_p)
- *this_id = frame_id_build_unavailable_stack (cache->func);
- else
- *this_id = frame_id_build (cache->prev_sp, cache->func);
+ *this_id = frame_id_build (cache->prev_sp, cache->func);
}
/* Implement the "prev_register" frame_unwind method. */
@@ -876,19 +856,9 @@ aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache)
cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
*this_cache = cache;
- TRY
- {
- cache->prev_sp = get_frame_register_unsigned (this_frame,
- AARCH64_SP_REGNUM);
- cache->prev_pc = get_frame_pc (this_frame);
- cache->available_p = 1;
- }
- CATCH (ex, RETURN_MASK_ERROR)
- {
- if (ex.error != NOT_AVAILABLE_ERROR)
- throw_exception (ex);
- }
- END_CATCH
+ cache->prev_sp = get_frame_register_unsigned (this_frame,
+ AARCH64_SP_REGNUM);
+ cache->prev_pc = get_frame_pc (this_frame);
return cache;
}
@@ -902,9 +872,6 @@ aarch64_stub_frame_unwind_stop_reason (struct frame_info *this_frame,
struct aarch64_prologue_cache *cache
= aarch64_make_stub_cache (this_frame, this_cache);
- if (!cache->available_p)
- return UNWIND_UNAVAILABLE;
-
return UNWIND_NO_REASON;
}
@@ -917,10 +884,7 @@ aarch64_stub_this_id (struct frame_info *this_frame,
struct aarch64_prologue_cache *cache
= aarch64_make_stub_cache (this_frame, this_cache);
- if (cache->available_p)
- *this_id = frame_id_build (cache->prev_sp, cache->prev_pc);
- else
- *this_id = frame_id_build_unavailable_stack (cache->prev_pc);
+ *this_id = frame_id_build (cache->prev_sp, cache->prev_pc);
}
/* Implement the "sniffer" frame_unwind method. */