aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Lee <walt@tilera.com>2013-02-19 16:20:47 +0000
committerWalter Lee <walt@tilera.com>2013-02-19 16:20:47 +0000
commit3e9d51302a082edbae7e6b1b614a4dfb5e4934aa (patch)
treef951c1609a48579e1634d478cf036f25039bb80f
parent4aaf25031b9372b24fa813709dd310724696a5bf (diff)
downloadgdb-3e9d51302a082edbae7e6b1b614a4dfb5e4934aa.zip
gdb-3e9d51302a082edbae7e6b1b614a4dfb5e4934aa.tar.gz
gdb-3e9d51302a082edbae7e6b1b614a4dfb5e4934aa.tar.bz2
* tilegx-tdep.c (tilegx_skip_prologue): Use skip_prologue_using_sal.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/tilegx-tdep.c17
2 files changed, 13 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7e1db905..8d7829b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2013-02-19 Jiong Wang <jiwang@tilera.com>
+ * tilegx-tdep.c (tilegx_skip_prologue): Use skip_prologue_using_sal.
+
+2013-02-19 Jiong Wang <jiwang@tilera.com>
+
* tilegx-tdep.c (INT_SWINT_1_SIGRETURN): New macro.
(tilegx_write_pc): New function.
(tilegx_cannot_reference_register): Return zero if REGNO
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index 5d2e3ee..b7f1dfc 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -731,24 +731,25 @@ tilegx_analyze_prologue (struct gdbarch* gdbarch,
/* This is the implementation of gdbarch method skip_prologue. */
static CORE_ADDR
-tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
+tilegx_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
{
- struct symtab_and_line sal;
- CORE_ADDR func_start, func_end;
+ CORE_ADDR func_start;
/* This is the preferred method, find the end of the prologue by
using the debugging information. */
- if (find_pc_partial_function (pc, NULL, &func_start, &func_end))
+ if (find_pc_partial_function (start_pc, NULL, &func_start, NULL))
{
- sal = find_pc_line (func_start, 0);
+ CORE_ADDR post_prologue_pc
+ = skip_prologue_using_sal (gdbarch, func_start);
- if (sal.end < func_end && pc <= sal.end)
- return sal.end;
+ if (post_prologue_pc != 0)
+ return max (start_pc, post_prologue_pc);
}
/* Otherwise, try to skip prologue the hard way. */
return tilegx_analyze_prologue (gdbarch,
- pc, pc + 8 * TILEGX_BUNDLE_SIZE_IN_BYTES,
+ start_pc,
+ start_pc + 8 * TILEGX_BUNDLE_SIZE_IN_BYTES,
NULL, NULL);
}