From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22602 invoked by alias); 21 Mar 2012 15:02:14 -0000 Received: (qmail 22588 invoked by uid 22791); 21 Mar 2012 15:02:11 -0000 X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtprelay05.ispgateway.de (HELO smtprelay05.ispgateway.de) (80.67.31.99) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Mar 2012 15:01:57 +0000 Received: from [94.195.205.30] (helo=[192.168.1.62]) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1SAN2x-0005FC-Ka; Wed, 21 Mar 2012 16:01:55 +0100 Message-ID: <4F69ED5D.1000006@mfriebe.de> Date: Wed, 21 Mar 2012 15:02:00 -0000 From: Martin User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: gdb@sourceware.org Subject: possible regression in gdb 7.4 with -break-insert +0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Df-Sender: bGF6YXJ1c0BtZnJpZWJlLmRl Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00055.txt.bz2 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="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)