public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Martin <lazarus@mfriebe.de>
To: gdb@sourceware.org
Subject: possible regression in gdb 7.4 with -break-insert +0
Date: Wed, 21 Mar 2012 15:02:00 -0000	[thread overview]
Message-ID: <4F69ED5D.1000006@mfriebe.de> (raw)

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)



             reply	other threads:[~2012-03-21 15:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 15:02 Martin [this message]
2012-03-21 15:41 ` Keith Seitz
2012-03-21 15:44   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F69ED5D.1000006@mfriebe.de \
    --to=lazarus@mfriebe.de \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).