This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]