This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
breakpoints/943: GDB cannot set breakpoint on executable line
- From: sana at stl dot sarov dot ru
- To: gdb-gnats at sources dot redhat dot com
- Cc: miwako dot tokugawa at intel dot com
- Date: 17 Jan 2003 09:28:52 -0000
- Subject: breakpoints/943: GDB cannot set breakpoint on executable line
- Reply-to: sana at stl dot sarov dot ru
>Number: 943
>Category: breakpoints
>Synopsis: GDB cannot set breakpoint on executable line
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 17 01:38:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: sana@stl.sarov.ru
>Release: unknown-1.0
>Organization:
>Environment:
64-bit Linux
>Description:
Line number info looks like correct. Debugger sets the breakpoints at the correct instruction. But it can not stop at this breakpoint.
It is probably GDB has a bug making it unable to stop on second instruction in bundle which consists from two instructions only:
{ .mli
nop.m 0
movl r10=0x4047800000000000 ;;
}
Regression test is:
int main()
{
double fff;
fff = 47.0;
fff= 93.0;
fff = -100;
return fff;
}
Fragment of assembler code for it:
.global main#
.align 32
main:
//Current file - test.c
.b1_0_2_0:
{ .mfi
add sp=-16,sp //0: 2
nop.f 0
nop.i 0
}
.debug_start_1_0:
{ .mli
nop.m 0
movl r14=0x4047800000000000 ;; //0: 5
}
.b1_0_5_1:
{ .mii
setf.d f10=r14 //1: 5
add r11=16,sp //1: 5
nop.i 0 ;;
} { .mfi
stfd [r11]=f10 //10: 5
nop.f 0
nop.i 0
} { .mli
nop.m 0
movl r10=0x4057400000000000 ;; //10: 6
}
.b1_0_6_2:
{ .mii
setf.d f9=r10 //11: 6
add r9=16,sp //11: 6
nop.i 0 ;;
} { .mfi
stfd [r9]=f9 //20: 6
nop.f 0
nop.i 0
} { .mli
nop.m 0
movl r8=0xc059000000000000 ;; //20: 7
}
Fragment of executable file dump:
4000000000002280 <main>:
4000000000002280: 08 00 25 12 80 05 [MMI] alloc r32=ar.pfs,9,9
,0
4000000000002286: 00 00 00 02 00 80 nop.m 0x0
400000000000228c: 01 66 fc 8c adds r12=-32,r12
4000000000002290: 05 00 00 00 01 00 [MLX] nop.m 0x0
4000000000002296: 00 00 80 47 40 20 movl r33=0x404780000
0000000;;
400000000000229c: 04 00 00 60
40000000000022a0: 01 30 84 00 f9 18 [MII] setf.d f6=r33
40000000000022a6: 20 82 30 00 42 00 adds r34=16,r12
40000000000022ac: 00 00 04 00 nop.i 0x0;;
40000000000022b0: 08 00 18 44 98 19 [MMI] stfd [r34]=f6
40000000000022b6: 00 00 00 02 00 00 nop.m 0x0
40000000000022bc: 00 00 04 00 nop.i 0x0
40000000000022c0: 05 00 00 00 01 00 [MLX] nop.m 0x0
40000000000022c6: 00 00 40 57 40 60 movl r35=0x405740000
0000000;;
40000000000022cc: 04 00 00 60
Example of debuf session with GDB:
This GDB was configured as "ia64-redhat-linux"...
(gdb) b 5
Breakpoint 1 at 0x4000000000002291: file test.c, line 5.
(gdb) b 6
Breakpoint 2 at 0x40000000000022c1: file test.c, line 6.
(gdb) r
Starting program: /home/sana/trackers/tracker/tr18278/a.out
Program exited with code 0234.
(gdb)
Example of debug session with IDB:
Linux Application Debugger for Itanium(R)-based applications, Version 7.0 Beta, Build 20020715
------------------
object file name: a.out
Reading symbolic information ...done
b 5
(idb) b 5
[#1: stop at "test.c":5 ]
(idb) b 6
[#2: stop at "test.c":6 ]
(idb) r
[1] stopped at [int main(void):5 0x4000000000002291]
5 fff = 47.0;
(idb) c
[2] stopped at [int main(void):6 0x40000000000022c1]
6 fff= 93.0;
(idb)
>How-To-Repeat:
Regerssion test is attached or below:
int main()
{
double fff;
fff = 47.0;
fff= 93.0;
fff = -100;
return fff;
}
Intel compiler should be used.
Command line is 'ecc -g test.c'.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="test.c"
Content-Disposition: inline; filename="test.c"
int main()
{
double fff;
fff = 47.0;
fff= 93.0;
fff = -100;
return fff;
}