This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/10112] do not stop on function
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 22 Oct 2009 17:47:01 -0000
- Subject: [Bug breakpoints/10112] do not stop on function
- References: <20090429113846.10112.dushistov@mail.ru>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From ppluzhnikov at google dot com 2009-10-22 17:47 -------
This sounds very familiar:
Extended opcode 2: set Address to 0x80483e4
Special opcode 8: advance Address by 0 to 0x80483e4 and Line by 3 to 4
Advance PC by constant 17 to 0x80483f5
GDB sets breakpoint here ==>
Special opcode 49: advance Address by 3 to 0x80483f8 and Line by 2 to 6
Special opcode 62: advance Address by 4 to 0x80483fc and Line by 1 to 7
but should have set it here instead ==>
Special opcode 199: advance Address by 14 to 0x804840a and Line by -2 to 5
I am about 95% certain this was fixed on the GCC side.
FWIW, in my (patched) GCC-4.3.1, the line table looks like this:
Extended opcode 2: set Address to 0x8048260
Special opcode 8: advance Address by 0 to 0x8048260 and Line by 3 to 4
Advance PC by constant 17 to 0x8048271
This is the entry which causes GDB to work correctly ==>
Special opcode 20: advance Address by 1 to 0x8048272 and Line by 1 to 5
Special opcode 34: advance Address by 2 to 0x8048274 and Line by 1 to 6
Special opcode 62: advance Address by 4 to 0x8048278 and Line by 1 to 7
Special opcode 199: advance Address by 14 to 0x8048286 and Line by -2 to 5
And the corresponding disassembly:
(gdb) disas/m f
Dump of assembler code for function f:
4 {
0x08048260 <+0>: push %ebp
0x08048261 <+1>: mov %esp,%ebp
0x08048263 <+3>: sub $0x18,%esp
0x08048266 <+6>: mov 0xc(%ebp),%eax
0x08048269 <+9>: mov %eax,-0x8(%ebp)
0x0804826c <+12>: mov 0x10(%ebp),%eax
0x0804826f <+15>: mov %eax,-0x4(%ebp)
5 while (gsec < 0.0) {
0x08048272 <+18>: jmp 0x8048286 <f+38>
0x08048286 <+38>: fldl -0x8(%ebp)
0x08048289 <+41>: fldz
0x0804828b <+43>: fucomip %st(1),%st
0x0804828d <+45>: fstp %st(0)
0x0804828f <+47>: ja 0x8048274 <f+20>
0x08048291 <+49>: jmp 0x80482a5 <f+69>
6 gwk--;
0x08048274 <+20>: subl $0x1,0x8(%ebp)
7 gsec += 604800.0;
0x08048278 <+24>: fldl -0x8(%ebp)
0x0804827b <+27>: fldl 0x80483c8
0x08048281 <+33>: faddp %st,%st(1)
0x08048283 <+35>: fstpl -0x8(%ebp)
8 }
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10112
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.