Mail Archives: cygwin/2010/09/30/09:45:10
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KAM_STOCKTIP,RCVD_IN_DNSWL_NONE,TW_BJ
|
X-Spam-Check-By: | sourceware.org
|
MIME-Version: | 1.0
|
Date: | Thu, 30 Sep 2010 15:44:54 +0200
|
Message-ID: | <AANLkTimXmD3hSxN1uMjD+Ox-SBxJ-hN+VgkrvYpuJh4Z@mail.gmail.com>
|
Subject: | gcc-4.5 + gdb dwarf problems
|
From: | Reini Urban <rurban AT x-ray DOT at>
|
To: | The Cygwin Mailing List <cygwin AT cygwin DOT com>
|
X-IsSubscribed: | yes
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
Hi
I think I've found an issue with the new gcc-4.5 with latest gdb.
I only experience these problems in the gdb debugger, when the
sourceline for the function is wrong,
but inspecting the dwarf output, esp the line info via objdump -Wl looks go=
od.
objdump -Sgl also looks good.
objdump: The path of the source files resolves to something wrong in
objdump -Wl.
gdb: If linked with a library as dll (cygperl.dll in my case) the
arguments are not displayed in the debugger,
if linked to a static .a or .o, the arguments are displayed okay.
E.g. debugging perl linked to the static libperl.a like
gcc-4 -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -march=3Dpentium4
-mfpmath=3Dsse -mieee-fp -mmmx -msse -msse2 -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/usr/lib/perl5/5.13.5/i686-nothreads-debug-cygwin/CORE -g3
ccode27_o2.c -o ccode27_o2 -Wl,--enable-auto-import
-Wl,--export-all-symbols -Wl,--stack,8388608
-Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib
/usr/lib/perl5/5.13.5/i686-nothreads-debug-cygwin/auto/Win32CORE/Win32CORE.a
/usr/lib/perl5/5.13.5/i686-nothreads-debug-cygwin/CORE/libperl.a
/usr/lib/perl5/5.13.5/i686-nothreads-debug-cygwin/CORE/DynaLoader.a
-ldl -lcrypt
=3D>
objdump -WL -S -gl ccode27_o2.exe|less
CU: /usr/lib/perl5/5.13.5/i686-nothreads-debug-cygwin/CORE/ccode27_o2.c:
but the /ccode27_o2.c is in ./, the line info is correct here. I can
debug into it fine.
next obj is
CU: /usr/include/sys/gv.c:
File name Line number Starting address
gv.c 45 0x406f98
And this is in /usr/lib/perl5/5.13.5/i686-nothreads-debug-cygwin/CORE/
not in /usr/include/sys/
$ gdb ccode27_o2.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
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-cygwin"...
(gdb) run
Starting program: /cygdrive/d/data/urbanr/My
Documents/Perl/B-C-work/ccode27_o2.exe
[New thread 1988.0x116c]
[New thread 1988.0x1358]
ok
Program received signal SIGSEGV, Segmentation fault.
0x0068391b in Perl_pad_undef (cv=3D0x24a3d60) at pad.c:138
138 PERL_ARGS_ASSERT_PAD_PEG;
If linked to the dll the cv argument is missing.
And the correct src line is pad.c:256, not pad.c:138
objdump -S -gl ccode27_o2.exe|^egrep -7 ^Perl_pad_undef
00683785 <_Perl_pad_undef>:
Perl_pad_undef():
/usr/src/perl/blead/buildntdebug/pad.c:256
=3Dcut
*/
void
Perl_pad_undef(pTHX_ CV* cv)
{
--=20
Reini Urban
http://phpwiki.org/=A0 =A0 =A0 =A0 =A0=A0 http://murbreak.at/
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -