From 482a4d06a0ca7c1dea299112ae793931723a6556 Mon Sep 17 00:00:00 2001 From: Michal Ludvig Date: Tue, 11 Jun 2002 06:11:31 +0000 Subject: [PATCH] 2002-06-11 Michal Ludvig * x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions without debug information too. --- gdb/ChangeLog | 5 +++++ gdb/x86-64-tdep.c | 11 +++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9c920e31dfe..36ff17bd8fc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-06-11 Michal Ludvig + + * x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions + without debug information too. + 2002-06-10 Andrew Cagney * gdbarch.sh (PRINT_FLOAT_INFO): Add frame and ui_file parameters. diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index 6391e756c9b..a7b9d0b4cf1 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -857,10 +857,10 @@ x86_64_frameless_function_invocation (struct frame_info *frame) CORE_ADDR x86_64_skip_prologue (CORE_ADDR pc) { - int i, firstline, currline; + int i; struct symtab_and_line v_sal; struct symbol *v_function; - CORE_ADDR salendaddr = 0, endaddr = 0; + CORE_ADDR endaddr; /* We will handle only functions beginning with: 55 pushq %rbp @@ -888,18 +888,13 @@ x86_64_skip_prologue (CORE_ADDR pc) if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab) return pc; - firstline = v_sal.line; - currline = firstline; - salendaddr = v_sal.end; endaddr = v_function->ginfo.value.block->endaddr; for (i = 0; i < v_sal.symtab->linetable->nitems; i++) - if (v_sal.symtab->linetable->item[i].line > firstline - && v_sal.symtab->linetable->item[i].pc >= salendaddr + if (v_sal.symtab->linetable->item[i].pc >= pc && v_sal.symtab->linetable->item[i].pc < endaddr) { pc = v_sal.symtab->linetable->item[i].pc; - currline = v_sal.symtab->linetable->item[i].line; break; } -- 2.30.2