public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* possible regression in gdb 7.4 with -break-insert +0
@ 2012-03-21 15:02 Martin
  2012-03-21 15:41 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Martin @ 2012-03-21 15:02 UTC (permalink / raw)
  To: gdb

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)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-21 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 15:02 possible regression in gdb 7.4 with -break-insert +0 Martin
2012-03-21 15:41 ` Keith Seitz
2012-03-21 15:44   ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).