public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug
@ 2012-08-28 16:53 lrn1986 at gmail dot com
  2012-12-19  8:06 ` [Bug win32/14527] " muhammad_bilal at mentor dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: lrn1986 at gmail dot com @ 2012-08-28 16:53 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14527

             Bug #: 14527
           Summary: warning: section .gnu_debuglink not found in
                    MODULENAME.debug
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: minor
          Priority: P2
         Component: win32
        AssignedTo: unassigned@sourceware.org
        ReportedBy: lrn1986@gmail.com
    Classification: Unclassified


Run this:
gcc -g ./test.c -o ./test.exe
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --strip-debug  ./test.exe
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe
gdb -ex r -ex q --return-child-result ./test.exe

test.c:
#include <stdio.h>

int main (int argc, char **argv)
{
  printf ("Hello, World!\n");
  return 0;
}

gdb (7.5 from mingw.org) will say:
Reading symbols from PATH_TO\test.exe...Reading symbols from
PATH_TO\test.exe.dbg...
warning: section .gnu_debuglink not found in PATH_TO\test.exe.dbg
done.
done.

Why does gdb warn me about the lack of debuglink in a file with full debug info
(the test.exe.dbg file)? It's not supposed to have that section.

This can be worked around by doing the following:
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --remove-section=.gnu_debuglink ./test.exe
objcopy --strip-debug ./test.exe
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe

This way test.exe.gbg file gets a .gnu_debuglink section (doesn't matter where
it's pointing), and its contents pass the CRC32 check

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug win32/14527] warning: section .gnu_debuglink not found in MODULENAME.debug
  2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
@ 2012-12-19  8:06 ` muhammad_bilal at mentor dot com
  2012-12-19 10:21 ` lrn1986 at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: muhammad_bilal at mentor dot com @ 2012-12-19  8:06 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14527

muhammad_bilal at mentor dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |muhammad_bilal at mentor
                   |                            |dot com

--- Comment #1 from muhammad_bilal at mentor dot com 2012-12-19 08:06:33 UTC ---
Hi LRN
I have used this command

gcc -g hello.c -o hello
objcopy --only-keep-debug ./hello ./hello.gdb
objcopy --strip-debug ./hello
objcopy --add-gnu-debuglink="hello.gdb" ./hello
gdb -ex r -ex q --return-child-result ./hello

then gdb show correcrt output:


GNU gdb (GDB) 7.5.50.20121127
Copyright (C) 2012 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 "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/mbilal/Desktop/hello...Reading symbols from
/home/mbilal/Desktop/hello.gdb...done.
done.
Starting program: /home/mbilal/Desktop/hello 
hello world
[Inferior 1 (process 8948) exited normally]

for a file of 
hello.c
#include<stdio.h>
int main()
{        
printf("hello world\n");
return 0;
}

it worked fine

regards

Bilal

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug win32/14527] warning: section .gnu_debuglink not found in MODULENAME.debug
  2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
  2012-12-19  8:06 ` [Bug win32/14527] " muhammad_bilal at mentor dot com
@ 2012-12-19 10:21 ` lrn1986 at gmail dot com
  2013-03-31  1:06 ` lrn1986 at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: lrn1986 at gmail dot com @ 2012-12-19 10:21 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14527

--- Comment #2 from LRN <lrn1986 at gmail dot com> 2012-12-19 10:21:05 UTC ---
Hi bilal

Have you tried to do the same on W32 (not sure about Wine, but it might be good
idea to try that too)?

The bug is filed against "win32" component because it does not seem like anyone
is getting this on other platforms.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug win32/14527] warning: section .gnu_debuglink not found in MODULENAME.debug
  2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
  2012-12-19  8:06 ` [Bug win32/14527] " muhammad_bilal at mentor dot com
  2012-12-19 10:21 ` lrn1986 at gmail dot com
@ 2013-03-31  1:06 ` lrn1986 at gmail dot com
  2013-03-31  2:26 ` lrn1986 at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: lrn1986 at gmail dot com @ 2013-03-31  1:06 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14527

--- Comment #3 from LRN <lrn1986 at gmail dot com> 2013-03-31 01:06:09 UTC ---
Doesn't happen for me in objcopy 2.23.2 + gdb 7.5.1 anymore.
In fact, doing what i did before (to work around this) now results in gdb not
seeing debug link between stripped file and dbg-file (link is still in stripped
file, i can see it on a hex dump).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug win32/14527] warning: section .gnu_debuglink not found in MODULENAME.debug
  2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
                   ` (2 preceding siblings ...)
  2013-03-31  1:06 ` lrn1986 at gmail dot com
@ 2013-03-31  2:26 ` lrn1986 at gmail dot com
  2013-03-31  2:29 ` mbilal at codesourcery dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: lrn1986 at gmail dot com @ 2013-03-31  2:26 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14527

--- Comment #4 from LRN <lrn1986 at gmail dot com> 2013-03-31 02:26:11 UTC ---
No, false alarm. Bug still exists.

That said, i verified that now i need to do this to get debug info to work
correctly, and without any warnings:
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe
objcopy --only-keep-debug ./test.exe ./test.exe.dbg
objcopy --remove-section=.gnu_debuglink ./test.exe
objcopy --add-gnu-debuglink="test.exe.dbg" ./test.exe
objcopy --strip-debug ./test.exe

(that is, add debug link before stripping)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug win32/14527] warning: section .gnu_debuglink not found in MODULENAME.debug
  2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
                   ` (3 preceding siblings ...)
  2013-03-31  2:26 ` lrn1986 at gmail dot com
@ 2013-03-31  2:29 ` mbilal at codesourcery dot com
  2014-04-05  6:46 ` asmwarrior at gmail dot com
  2023-02-17 16:47 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mbilal at codesourcery dot com @ 2013-03-31  2:29 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14527

hmb <mbilal at codesourcery dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|mbilal at codesourcery dot  |
                   |com                         |

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug win32/14527] warning: section .gnu_debuglink not found in MODULENAME.debug
  2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
                   ` (4 preceding siblings ...)
  2013-03-31  2:29 ` mbilal at codesourcery dot com
@ 2014-04-05  6:46 ` asmwarrior at gmail dot com
  2023-02-17 16:47 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: asmwarrior at gmail dot com @ 2014-04-05  6:46 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=14527

asmwarrior <asmwarrior at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |asmwarrior at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug win32/14527] warning: section .gnu_debuglink not found in MODULENAME.debug
  2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
                   ` (5 preceding siblings ...)
  2014-04-05  6:46 ` asmwarrior at gmail dot com
@ 2023-02-17 16:47 ` tromey at sourceware dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-02-17 16:47 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=14527

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
             Status|NEW                         |WAITING

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
Is this still an issue?

On Linux, I don't see the warning.
I also cross-built the executable with the mingw tools and didn't see it.
I didn't try on a Windows host but I suspect this has just been fixed
at some point in the past.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-02-17 16:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-28 16:53 [Bug win32/14527] New: warning: section .gnu_debuglink not found in MODULENAME.debug lrn1986 at gmail dot com
2012-12-19  8:06 ` [Bug win32/14527] " muhammad_bilal at mentor dot com
2012-12-19 10:21 ` lrn1986 at gmail dot com
2013-03-31  1:06 ` lrn1986 at gmail dot com
2013-03-31  2:26 ` lrn1986 at gmail dot com
2013-03-31  2:29 ` mbilal at codesourcery dot com
2014-04-05  6:46 ` asmwarrior at gmail dot com
2023-02-17 16:47 ` tromey at sourceware dot org

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).