This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc-4.5 + gdb dwarf problems


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 good.
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=pentium4
-mfpmath=sse -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
=>

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.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-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=0x24a3d60) 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
=cut
*/

void
Perl_pad_undef(pTHX_ CV* cv)
{


-- 
Reini Urban
http://phpwiki.org/? ? ? ? ?? 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]