This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] S390: Skip prologue using SAL information, if possible
- From: Andreas Krebbel <krebbel at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 11 Mar 2015 10:12:07 -0000
- Subject: [binutils-gdb] S390: Skip prologue using SAL information, if possible
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f054145ed2bad0aa0f57b2a4c3ca6988b213d1a3
commit f054145ed2bad0aa0f57b2a4c3ca6988b213d1a3
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Date: Wed Mar 11 11:11:45 2015 +0100
S390: Skip prologue using SAL information, if possible
Instead of analyzing the prologue and possibly coming to a wrong
conclusion, this change tries to skip the prologue with the use of
skip_prologue_using_sal. Only if that fails, the prologue analyzer is
invoked as before.
gdb/ChangeLog:
* s390-linux-tdep.c (s390_skip_prologue): Skip the prologue using
SAL, if possible.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/s390-linux-tdep.c | 11 ++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9101efd..d247a6a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-03-11 Andreas Arnez <arnez@linux.vnet.ibm.com>
+ * s390-linux-tdep.c (s390_skip_prologue): Skip the prologue using
+ SAL, if possible.
+
+2015-03-11 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
* s390-linux-nat.c (struct arch_lwp_info): New.
(s390_fix_watch_points): Rename to...
(s390_prepare_to_resume): ...this. Skip the PER info update
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index e33eb8e..cafa57b 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -1462,7 +1462,16 @@ static CORE_ADDR
s390_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct s390_prologue_data data;
- CORE_ADDR skip_pc;
+ CORE_ADDR skip_pc, func_addr;
+
+ if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
+ {
+ CORE_ADDR post_prologue_pc
+ = skip_prologue_using_sal (gdbarch, func_addr);
+ if (post_prologue_pc != 0)
+ return max (pc, post_prologue_pc);
+ }
+
skip_pc = s390_analyze_prologue (gdbarch, pc, (CORE_ADDR)-1, &data);
return skip_pc ? skip_pc : pc;
}