This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
possible regression in gdb 7.4 with -break-insert +0
- From: Martin <lazarus at mfriebe dot de>
- To: gdb at sourceware dot org
- Date: Wed, 21 Mar 2012 15:01:49 +0000
- Subject: possible regression in gdb 7.4 with -break-insert +0
I believe I found a regression in gdb 7.4. (Tested on Win 32bit Vista)
using "gdb -i mi", the command "-break-insert +0" should insert a
breakpoint at the an offset of 0 lines from current.
- With previous versions of gdb, if the command was issued before
-exec-run, then a breakpoint was inserted at the first line of code.
- With 7.4-2, it is inserted, but when running gives the error:
&"Error in re-setting breakpoint 1: No line 0 in file \"Test.pas\".\n"
To reproduce ( I use FreePascal 2.6 )
program Test;
begin
writeln('Hello World');
end.
compile with:
fpc.exe -g Test.pas
In the GDB output, I stripped some unrelated feedback
gdb 7.4 never stops. Also note the difference in "original-location"
gdb 7.3 stops as expected
GDB\7.4-2\gdb.exe -i mi
(gdb)
-file-exec-and-symbols Test.exe
^done
(gdb)
-break-insert +0
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x004013fe",func="main",file="Test.pas",fullname="B:\\tmp\\bug0\\Test.pas",line="1",times="0",original-location="Test.pas:+0"}
(gdb)
-exec-run
=thread-group-started,id="i1",pid="7132"
=thread-created,id="1",group-id="i1"
~"[New Thread 7132.0x2418]\n"
^running
*running,thread-id="all"
(gdb)
&"Error in re-setting breakpoint 1: No line 0 in file \"Test.pas\".\n"
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="n",addr="<PENDING>",pending="Test.pas:+0",times="0",original-location="Test.pas:+0"}
Hello World
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1",exit-code="0"
*stopped,reason="exited-normally"
(gdb)
GDB\7.3-2\gdb.exe -i mi
-file-exec-and-symbols Test.exe
^done
(gdb)
-break-insert +0
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x004013fe",func="main",file="Test.pas",fullname="b:\\tmp\\bug0\\test.pas",line="1",times="0",original-location="Test.pas:1"}
(gdb)
-exec-run
=thread-group-started,id="i1",pid="7200"
=thread-created,id="1",group-id="i1"
~"[New Thread 7200.0x17e8]\n"
^running
*running,thread-id="all"
(gdb)
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x004013fe",func="main",args=[],file="Test.pas",fullname="b:\\tmp\\bug0\\test.pas",line="4"},thread-id="1",stopped-threads="all"
(gdb)