* tilegx-tdep.c (tilegx_skip_prologue): Use skip_prologue_using_sal.
This commit is contained in:
parent
4aaf25031b
commit
3e9d51302a
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2013-02-19 Jiong Wang <jiwang@tilera.com>
|
||||||
|
|
||||||
* tilegx-tdep.c (INT_SWINT_1_SIGRETURN): New macro.
|
* tilegx-tdep.c (INT_SWINT_1_SIGRETURN): New macro.
|
||||||
|
|
|
@ -731,24 +731,25 @@ tilegx_analyze_prologue (struct gdbarch* gdbarch,
|
||||||
/* This is the implementation of gdbarch method skip_prologue. */
|
/* This is the implementation of gdbarch method skip_prologue. */
|
||||||
|
|
||||||
static CORE_ADDR
|
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;
|
||||||
CORE_ADDR func_start, func_end;
|
|
||||||
|
|
||||||
/* This is the preferred method, find the end of the prologue by
|
/* This is the preferred method, find the end of the prologue by
|
||||||
using the debugging information. */
|
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)
|
if (post_prologue_pc != 0)
|
||||||
return sal.end;
|
return max (start_pc, post_prologue_pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, try to skip prologue the hard way. */
|
/* Otherwise, try to skip prologue the hard way. */
|
||||||
return tilegx_analyze_prologue (gdbarch,
|
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);
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue