This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [ARM] minor opt in thumb_stack_frame_destroyed_p
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Mon, 18 Apr 2016 08:52:45 +0100
- Subject: Re: [PATCH] [ARM] minor opt in thumb_stack_frame_destroyed_p
- Authentication-results: sourceware.org; auth=none
- References: <1460730578-28723-1-git-send-email-yao dot qi at linaro dot org> <571115C3 dot 8010500 at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> This assumes epilogue sequences are always at the end of the function.
Ur, right. Looks compiler can place prologue and epilogue in the middle
of the function, no at the first or last blocks.
The patch is reverted.
--
Yao (éå)
From 5947319ef398728052a22575e1d0de0e94e4220f Mon Sep 17 00:00:00 2001
From: Yao Qi <yao.qi@linaro.org>
Date: Mon, 18 Apr 2016 08:50:09 +0100
Subject: [PATCH] Revert 415fa612
2016-04-18 Yao Qi <yao.qi@linaro.org>
Revert:
2016-04-15 Yao Qi <yao.qi@linaro.org>
* arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
PC is far from the end of function.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bafbbe6..daf86d9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2016-04-18 Yao Qi <yao.qi@linaro.org>
+
+ Revert:
+ 2016-04-15 Yao Qi <yao.qi@linaro.org>
+
+ * arm-tdep.c (thumb_stack_frame_destroyed_p): Return zero if
+ PC is far from the end of function.
+
2016-04-16 Pedro Alves <palves@redhat.com>
* ada-exp.y (yydefred): Define as ada_yydefred.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 36b0bcd..0412f71 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -3135,14 +3135,6 @@ thumb_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
if (!find_pc_partial_function (pc, NULL, &func_start, &func_end))
return 0;
- if (func_end - pc > 4 * 4)
- {
- /* There shouldn't be more than four instructions in epilogue.
- If PC is still 16 bytes away from FUNC_END, it isn't in
- epilogue. */
- return 0;
- }
-
/* The epilogue is a sequence of instructions along the following lines:
- add stack frame size to SP or FP