forked from Imagelibrary/binutils-gdb
* gdb/avr-tdep.c(avr_skip_prologue): Fix to return the correct pc.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2002-08-05 Theodore A. Roth <troth@verinet.com>
|
||||
|
||||
* gdb/avr-tdep.c(avr_skip_prologue): Fix to return the correct pc.
|
||||
|
||||
2002-08-05 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* mcore-tdep.c (mcore_gdbarch_init): Use
|
||||
|
||||
@@ -996,7 +996,14 @@ avr_skip_prologue (CORE_ADDR pc)
|
||||
{
|
||||
sal = find_pc_line (func_addr, 0);
|
||||
|
||||
if (sal.line != 0 && sal.end < func_end)
|
||||
/* troth/2002-08-05: For some very simple functions, gcc doesn't
|
||||
generate a prologue and the sal.end ends up being the 2-byte ``ret''
|
||||
instruction at the end of the function, but func_end ends up being
|
||||
the address of the first instruction of the _next_ function. By
|
||||
adjusting func_end by 2 bytes, we can catch these functions and not
|
||||
return sal.end if it is the ``ret'' instruction. */
|
||||
|
||||
if (sal.line != 0 && sal.end < (func_end-2))
|
||||
return sal.end;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user