• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisãoa09c1169086c02febcb2df4504f5e91bfa208b64 (tree)
Hora2018-03-13 23:31:58
AutorYao Qi <yao.qi@lina...>
CommiterYao Qi

Mensagem de Log

Throw exception in dwarf2 unwinders

This patch changes dwarf2 unwinders to not catch exceptions.

gdb:

2017-07-20 Yao Qi <yao.qi@linaro.org>

* dwarf2-frame.c (struct dwarf2_frame_cache) <unavailable_retaddr>:
Remove.
(dwarf2_frame_cache): Don't catch exception.
(dwarf2_frame_unwind_stop_reason): Don't check
cache->unavailable_retaddr.
(dwarf2_frame_this_id): Likewise.

Mudança Sumário

Diff

--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -922,10 +922,6 @@ struct dwarf2_frame_cache
922922 /* DWARF Call Frame Address. */
923923 CORE_ADDR cfa;
924924
925- /* Set if the return address column was marked as unavailable
926- (required non-collected memory or registers to compute). */
927- int unavailable_retaddr;
928-
929925 /* Set if the return address column was marked as undefined. */
930926 int undefined_retaddr;
931927
@@ -1037,41 +1033,27 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
10371033 execute_cfa_program (fde, instr, fde->end, gdbarch,
10381034 get_frame_address_in_block (this_frame), &fs);
10391035
1040- TRY
1041- {
1042- /* Calculate the CFA. */
1043- switch (fs.regs.cfa_how)
1044- {
1045- case CFA_REG_OFFSET:
1046- cache->cfa = read_addr_from_reg (this_frame, fs.regs.cfa_reg);
1047- if (fs.armcc_cfa_offsets_reversed)
1048- cache->cfa -= fs.regs.cfa_offset;
1049- else
1050- cache->cfa += fs.regs.cfa_offset;
1051- break;
1052-
1053- case CFA_EXP:
1054- cache->cfa =
1055- execute_stack_op (fs.regs.cfa_exp, fs.regs.cfa_exp_len,
1056- cache->addr_size, cache->text_offset,
1057- this_frame, 0, 0);
1058- break;
1059-
1060- default:
1061- internal_error (__FILE__, __LINE__, _("Unknown CFA rule."));
1062- }
1063- }
1064- CATCH (ex, RETURN_MASK_ERROR)
1036+ /* Calculate the CFA. */
1037+ switch (fs.regs.cfa_how)
10651038 {
1066- if (ex.error == NOT_AVAILABLE_ERROR)
1067- {
1068- cache->unavailable_retaddr = 1;
1069- return cache;
1070- }
1039+ case CFA_REG_OFFSET:
1040+ cache->cfa = read_addr_from_reg (this_frame, fs.regs.cfa_reg);
1041+ if (fs.armcc_cfa_offsets_reversed)
1042+ cache->cfa -= fs.regs.cfa_offset;
1043+ else
1044+ cache->cfa += fs.regs.cfa_offset;
1045+ break;
1046+
1047+ case CFA_EXP:
1048+ cache->cfa =
1049+ execute_stack_op (fs.regs.cfa_exp, fs.regs.cfa_exp_len,
1050+ cache->addr_size, cache->text_offset,
1051+ this_frame, 0, 0);
1052+ break;
10711053
1072- throw_exception (ex);
1054+ default:
1055+ internal_error (__FILE__, __LINE__, _("Unknown CFA rule."));
10731056 }
1074- END_CATCH
10751057
10761058 /* Initialize the register state. */
10771059 {
@@ -1181,9 +1163,6 @@ dwarf2_frame_unwind_stop_reason (struct frame_info *this_frame,
11811163 struct dwarf2_frame_cache *cache
11821164 = dwarf2_frame_cache (this_frame, this_cache);
11831165
1184- if (cache->unavailable_retaddr)
1185- return UNWIND_UNAVAILABLE;
1186-
11871166 if (cache->undefined_retaddr)
11881167 return UNWIND_OUTERMOST;
11891168
@@ -1197,11 +1176,7 @@ dwarf2_frame_this_id (struct frame_info *this_frame, void **this_cache,
11971176 struct dwarf2_frame_cache *cache =
11981177 dwarf2_frame_cache (this_frame, this_cache);
11991178
1200- if (cache->unavailable_retaddr)
1201- (*this_id) = frame_id_build_unavailable_stack (get_frame_func (this_frame));
1202- else if (cache->undefined_retaddr)
1203- return;
1204- else
1179+ if (!cache->undefined_retaddr)
12051180 (*this_id) = frame_id_build (cache->cfa, get_frame_func (this_frame));
12061181 }
12071182