This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog rs6000-tdep.c
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 18 Jan 2011 16:18:27 -0000
- Subject: src/gdb ChangeLog rs6000-tdep.c
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2011-01-18 16:18:27
Modified files:
gdb : ChangeLog rs6000-tdep.c
Log message:
[powerpc] breakpoint inserted past function end
On powerpc, the prologue scanner reads instruction after instruction,
and just skips instructions that do not affect a frame. This means
that it does not stop if if finds and unexpected instruction (which
could possibly happen with optimization, I presume). To avoid scanning
too many instructions, it tries to establish an upper limit.
The upper limit is first computed using the debugging (line) info,
but if that fails, it falls back on an arbitrary 100 bytes (or 25
instructions). The problem is that, if the function is shorter than
those 25 instructions, we run the risk of skipping the entire function
and returning a PC that's outside our function.
In the event where we can find a symbol for a given PC (and therefore
can determine function start and end addresses), but cannot find an
upper limit using skip_prologue_using_sal, then we can at least limit
make sure that the 25 instructions do not put us beyour our function.
If it does, then further reduce the upper-limit to the end of the function.
gdb/ChangeLog:
* rs6000-tdep.c (rs6000_skip_prologue): Make sure that the prologue
upper limit address is not greater than the function end address
when the upper limit could not be computed using the debugging
info.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12487&r2=1.12488
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/rs6000-tdep.c.diff?cvsroot=src&r1=1.347&r2=1.348