public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] S390: Skip prologue using SAL information, if possible
@ 2015-03-10 10:33 Andreas Arnez
  2015-03-10 15:29 ` Ulrich Weigand
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Arnez @ 2015-03-10 10:33 UTC (permalink / raw)
  To: gdb-patches; +Cc: Ulrich Weigand

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.
---
 gdb/s390-linux-tdep.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

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;
 }
-- 
1.9.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] S390: Skip prologue using SAL information, if possible
  2015-03-10 10:33 [PATCH] S390: Skip prologue using SAL information, if possible Andreas Arnez
@ 2015-03-10 15:29 ` Ulrich Weigand
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Weigand @ 2015-03-10 15:29 UTC (permalink / raw)
  To: Andreas Arnez; +Cc: gdb-patches

Andreas Arnez wrote:

> 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.

This is OK.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-10 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 10:33 [PATCH] S390: Skip prologue using SAL information, if possible Andreas Arnez
2015-03-10 15:29 ` Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).