aboutsummaryrefslogtreecommitdiff
path: root/gdb/x86-64-tdep.c
diff options
context:
space:
mode:
authorMichal Ludvig <mludvig@suse.cz>2002-06-11 06:11:31 +0000
committerMichal Ludvig <mludvig@suse.cz>2002-06-11 06:11:31 +0000
commit482a4d06a0ca7c1dea299112ae793931723a6556 (patch)
treef737ed71d9994683f4e8c2e9f92a724c8b820802 /gdb/x86-64-tdep.c
parentd855c300c716ddddc5e278bfa644c8939b52e19b (diff)
downloadgdb-482a4d06a0ca7c1dea299112ae793931723a6556.zip
gdb-482a4d06a0ca7c1dea299112ae793931723a6556.tar.gz
gdb-482a4d06a0ca7c1dea299112ae793931723a6556.tar.bz2
2002-06-11 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions without debug information too.
Diffstat (limited to 'gdb/x86-64-tdep.c')
-rw-r--r--gdb/x86-64-tdep.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 6391e75..a7b9d0b 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;
}