Debian Bug report logs - #730630
Line number 16 out of range; d2.c has 11 lines.

version graph

Package: gdb; Maintainer for gdb is Héctor Orón Martínez <[email protected]>; Source for gdb is src:gdb (PTS, buildd, popcon).

Reported by: Mathieu Malaterre <[email protected]>

Date: Wed, 27 Nov 2013 13:27:01 UTC

Severity: normal

Found in versions gdb/7.7.1+dfsg-5, gdb/7.6.1-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Héctor Orón Martínez <[email protected]>:
Bug#730630; Package gdb. (Wed, 27 Nov 2013 13:27:06 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Malaterre <[email protected]>:
New Bug report received and forwarded. Copy sent to Héctor Orón Martínez <[email protected]>. (Wed, 27 Nov 2013 13:27:06 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Mathieu Malaterre <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Line number 16 out of range; d2.c has 11 lines.
Date: Wed, 27 Nov 2013 14:24:15 +0100
[Message part 1 (text/plain, inline)]
Package: gdb
Version: 7.6.1-1

gdb/gcc does not like \r in C comment and get lost counting lines. See
attached C code.

Steps:

$ gcc -o demo -g d2.c
$ gdb ./demo
[...]
Reading symbols from /tmp/demo...done.
(gdb) b main
Breakpoint 1 at 0x4004c7: file d2.c, line 16.
(gdb) r
Starting program: /tmp/./demo
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?

Breakpoint 1, main (argc=1, argv=0x7fffffffe8d8) at d2.c:16
(gdb) list
Line number 16 out of range; d2.c has 11 lines.
[d2.c (text/x-csrc, attachment)]

Information forwarded to [email protected], Héctor Orón Martínez <[email protected]>:
Bug#730630; Package gdb. (Thu, 08 May 2014 12:36:21 GMT) (full text, mbox, link).


Acknowledgement sent to Hector Oron <[email protected]>:
Extra info received and forwarded to list. Copy sent to Héctor Orón Martínez <[email protected]>. (Thu, 08 May 2014 12:36:21 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Hector Oron <[email protected]>
To: Mathieu Malaterre <[email protected]>, [email protected]
Subject: Re: Bug#730630: Line number 16 out of range; d2.c has 11 lines.
Date: Thu, 8 May 2014 14:30:02 +0200
[Message part 1 (text/plain, inline)]
On Wed, Nov 27, 2013 at 02:24:15PM +0100, Mathieu Malaterre wrote:
> Package: gdb
> Version: 7.6.1-1
> 
> gdb/gcc does not like \r in C comment and get lost counting lines. See
> attached C code.
> 
> Steps:
> 
> $ gcc -o demo -g d2.c
> $ gdb ./demo
> [...]
> Reading symbols from /tmp/demo...done.
> (gdb) b main
> Breakpoint 1 at 0x4004c7: file d2.c, line 16.
> (gdb) r
> Starting program: /tmp/./demo
> warning: Could not load shared library symbols for linux-vdso.so.1.
> Do you need "set solib-search-path" or "set sysroot"?
> 
> Breakpoint 1, main (argc=1, argv=0x7fffffffe8d8) at d2.c:16
> (gdb) list
> Line number 16 out of range; d2.c has 11 lines.

I am unable to reproduce with upcoming 7.7-1 package.
Please verify again once it hits proper Debian.


> /*
> 1
 2
 3
 5
 6
 7
 8
 9
> */
> 
> static int foo() { return 42; }
> 
> int main(int argc, char *argv[])
> {
>   int v = foo();
>   return 0;
> }


-- 
  Hector Oron
[signature.asc (application/pgp-signature, inline)]

Information forwarded to [email protected], Héctor Orón Martínez <[email protected]>:
Bug#730630; Package gdb. (Fri, 16 Jan 2015 15:09:04 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Malaterre <[email protected]>:
Extra info received and forwarded to list. Copy sent to Héctor Orón Martínez <[email protected]>. (Fri, 16 Jan 2015 15:09:04 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Mathieu Malaterre <[email protected]>
To: [email protected]
Subject: still in jessie
Date: Fri, 16 Jan 2015 16:04:10 +0100
Control: found -1 7.7.1+dfsg-5

Still present in jessie:

$ wget "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=d2.c;att=1;bug=730630"
$ gcc -o demo -g d2.c
$ gdb ./demo
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./demo...done.
(gdb) b main
Breakpoint 1 at 0x4004d0: file d2.c, line 16.
(gdb) r
Starting program: /tmp/demo

Breakpoint 1, main (argc=1, argv=0x7fffffffe918) at d2.c:16
(gdb) list
Line number 16 out of range; d2.c has 11 lines.
(gdb) quit
A debugging session is active.

Inferior 1 [process 30379] will be killed.

Quit anyway? (y or n) y

with:

$ apt-cache policy gdb
gdb:
  Installed: 7.7.1+dfsg-5
  Candidate: 7.7.1+dfsg-5
  Version table:
 *** 7.7.1+dfsg-5 0
        500 http://ftp.fr.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status



Marked as found in versions gdb/7.7.1+dfsg-5. Request was from Mathieu Malaterre <[email protected]> to [email protected]. (Fri, 16 Jan 2015 15:09:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon Nov 11 13:47:14 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.