From 42a5f9a8d1caffda706d1371f1cfa5b2490bef03 Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Thu, 6 Dec 2012 14:11:08 +0800 Subject: [PATCH 4/5] * tilegx-tdep.c (tilegx_skip_prologue): use skip_prologue_using_sal instead of find_pc_line --- gdb/tilegx-tdep.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c index bc8cd35..1e967fe 100644 --- a/gdb/tilegx-tdep.c +++ b/gdb/tilegx-tdep.c @@ -741,24 +741,24 @@ 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); - - if (sal.end < func_end && pc <= sal.end) - return sal.end; + CORE_ADDR post_prologue_pc + = skip_prologue_using_sal (gdbarch, func_start); + 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); } -- 1.7.10.4