https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61352

            Bug ID: 61352
           Summary: gcc 4.9.0 debug code confuses gdb 7.7.1 on darwin11/12
                    but not gcc 4.8.3 debug code
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: howarth.at.gcc at gmail dot com

The new gdb 7.7.1 release, which works normally on both x86_64-apple-darwin11
and x86_64-apple-darwin12 (but still has issues with x86_64-apple-darwin13)
fails to step through code properly for binaries generated from gcc 4.9.0. For
example…

% gcc-fsf-4.9 -g -O1 himenoBMTxpa.c -o himenoBMTxpa
% sudo fsf-gdb ./himenoBMTxpa
GNU gdb (GDB) 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-apple-darwin12.5.0".
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 ./himenoBMTxpa...
warning: dsym file UUID doesn't match the one in /Users/howarth/himenoBMTxpa

warning: `/var/folders/1l/n78sywl52lz6kkys6nv7mnph0000gp/T//ccO87jsA.o': can't
open to read symbols: No such file or directory.
(no debugging symbols found)...done.
(gdb) break main
Breakpoint 1 at 0x1000014ef
(gdb) r
Starting program: /Users/howarth/himenoBMTxpa 
Breakpoint 1, 0x00000001000014ef in main ()
(gdb) s
Single stepping until exit from function main,
which has no line number information.
For example: 
 Grid-size= XS (32x32x64)
        S  (64x64x128)
        M  (128x128x256)
        L  (256x256x512)
        XL (512x512x1024)

Grid-size = 

whereas with gcc 4.8.3…

% gcc-fsf-4.8 -g -O1 himenoBMTxpa.c -o himenoBMTxpa
% sudo fsf-gdb ./himenoBMTxpa
GNU gdb (GDB) 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-apple-darwin12.5.0".
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 ./himenoBMTxpa...Reading symbols from
/Users/howarth/himenoBMTxpa.dSYM/Contents/Resources/DWARF/himenoBMTxpa...done.
done.
(gdb) break main
Breakpoint 1 at 0x100001500: file himenoBMTxpa.c, line 71.
(gdb) r
Starting program: /Users/howarth/himenoBMTxpa 

Breakpoint 1, main (argc=1, argv=0x7fff5fbff7d0) at himenoBMTxpa.c:71
71    {
(gdb) s
78      if(argc == 2){
(gdb)

Reply via email to