[#7702] GDB fails to find prologue
Submitted By: Stuart Henderson
Open Date
2013-03-13 06:13:39
Priority:
Medium High Assignee:
Nobody
Board:
N/A Silicon Revision:
Resolution:
N/A Fixed In Release:
N/A
Processor:
ALL
Host Operating System:
toolchain rev.:
kernel rev.:
State:
Open Found In Release:
2012R2
Is this bug repeatable?:
N/A
Summary: GDB fails to find prologue
Details:
In the, somewhat rare, example we have below, gdb will completely fail to set a breakpoint anywhere sensible. in the end it sets it off in bad memory. this is due to the prologue skipping code in GDB (gdb/bfin-tdep.c:bfin_skip_prologue()).
At this point I tried making the function a little bigger with NOPs, to push us over the UPPER_LIMIT, but this ended up creating a breakpoint at 0xffa00002 (pc = orig_pc + 2;), in the middle of an instruction.
This is causing some issues with Eclipse's default behaviour.
None of these issues are particularly huge, but I think they warrant a review of the prologue skipping code.
(gdb) x/10i $pc
0xffa00000 <new>: P0.H = 0xffc0; /* (-64) P0=0x0xffc00000(-4194304) */
0xffa00004 <new+4>: P1.H = 0xffe0; /* (-32) P1=0x0xffe00000(-2097152) */
0xffa00008 <new+8>: P0.L = 0x0; /* ( 0) P0=0x0xffc00000(-4194304) */
0xffa0000c <new+12>: R0.L = 0x800; /* (2048) R0=0x0x800(2048) */
0xffa00010 <new+16>: W[P0] = R0;
0xffa00012 <new+18>: SSYNC;
0xffa00014 <new+20>: P0.L = 0x4; /* ( 4) P0=0x0xffc00004(-4194300) */
0xffa00018 <new+24>: R0.L = 0x2; /* ( 2) R0=0x0x2( 2) */
0xffa0001c <new+28>: W[P0] = R0;
0xffa0001e <new+30>: SSYNC;
0xffa00020: NOP;
0xffa00022: JUMP.S 0x0xffa00000 <new>;
0xffa00024: RTS;
0xffa00026: NOP;
0xffa00028: I0.L = 0x1300; /* (4864) I0=0x0x1300(4864) */
0xffa0002c: I0.H = 0xffe0; /* (-32) I0=0x0xffe01300(-2092288) */
0xffa00030: I1.L = 0x300; /* (768) I1=0x0x300(768) */
0xffa00034: I1.H = 0xffe0; /* (-32) I1=0x0xffe00300(-2096384) */
0xffa00038: R7 = 0x0 (X); /* R7=0x0( 0) */
0xffa0003a: [I0] = R7;
(gdb) break new
Breakpoint 1 at 0xffa00024: file test.S, line 16.
Follow-ups
No Messages Were Found
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found