This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC/TileGX 2/6] simplify the handling of skip prologue for plt stub
- From: Jiong Wang <jiwang at tilera dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Walter Lee <walt at tilera dot com>
- Date: Fri, 18 Jan 2013 17:25:42 +0800
- Subject: [RFC/TileGX 2/6] simplify the handling of skip prologue for plt stub
for tilegx, when skip prologue, if the start_pc is a plt stub address, then
stop to go further, just return the start_pc.
gdb/ChangeLog:
* tilegx-tdep.c (tilegx_skip_prologue): simplify the handling for
plt stub.
please review.
---
Regards,
Jiong
Tilera Corporation.
---
gdb/tilegx-tdep.c | 4 ++++
1 files changed, 4 insertions(+)
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index 2f1d824..6432edb 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -746,6 +746,10 @@ tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
return sal.end;
}
+ /* for plt stub, just return the start pc */
+ if (in_plt_section (pc, NULL))
+ return pc;
+
/* Otherwise, try to skip prologue the hard way. */
return tilegx_analyze_prologue (gdbarch,
pc, pc + 8 * TILEGX_BUNDLE_SIZE_IN_BYTES,
--
1.7.10.3