Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-09

Re: line numbers in valgrind output ?

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dominique Leducq
Florian Klaempfl wrote 35 lines
Leducq Dominique wrote: > Le Vendredi 8 Septembre 2006 12:06, Peter Vreman a écrit : > >>> Le Jeudi 7 Septembre 2006 20:42, Peter Vreman a écrit : >>> >>>>> I can't figure out how to get source code filename & line numbers in >>>>> Valgrind output. What is the correct flags association ? >>>>> >>>>> I tried -gv, -gv -g, -gv -gw, -gv -gl,... >>>>> >>>>> I'm using Valgrind 3.2.0 in Debian Etch GNU/linux for x86_64, Fpc >>>>> >>>> 2.4.0 >>>> >>>> valgrind for x86_64 is not tested yet with fpc. >>>> >>> Well, I can help with testing... Perhaps I could even help with adapt the >>> code, should someone guide me and point me to relevant doc and code. >>> >> For 64bit systems we are only going to support the dwarf (-gw) debuginfo >> format. Code for that is only available in 2.1.1 in the file dbgdwarf.pas. >> >> >> > As I understand it, it is not yet supported at all ? Is there a way for me to > help ? > Test and help 2.1.1 fixing so we get 2.2.0 out soon. The dwarf support isn't merged back to 2.0.4. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

I reply on this list, which seems more appropriate, given the turn of the thread.

I just compiled the current 2.1.1 snapshot, and tried to compile a dumb program with it ( with -gw -gv) and run it under valgrind for x86_64 I got the following result :

test]$
/home/dleducq/fpc-2.1.1-20060908/lib/fpc/2.1.1/ppcx64 -gw -gv testvalgr.pas
-Fu/home/dleducq/fpc-2.1.1-20060908/lib/fpc/2.1.1/units/x86_64-linux/rtl Free Pascal Compiler version 2.1.1 [2006/09/08] for x86_64 Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling testvalgr.pas
Linking testvalgr
10 lines compiled, 0.0 sec
test]$ valgrind ./testvalgr
==23375== Memcheck, a memory error detector.
==23375== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==23375== Using LibVEX rev 1367, a library for dynamic binary translation. ==23375== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==23375== Using valgrind-3.0.1, a dynamic binary instrumentation framework. ==23375== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==23375== For more details, rerun with: -v
==23375==
vex amd64->IR: unhandled instruction bytes: 0xDB 0xE3 0x9B 0xD9 ==23375==
==23375== Process terminating with default action of signal 4 (SIGILL) ==23375== Illegal opcode at address 0x4007D8
==23375== at 0x4007D8: SYSTEM_SYSRESETFPU (in
/home/dleducq/src/test/testvalgr)
==23375== by 0x4004F0: (within /home/dleducq/src/test/testvalgr) ==23375==
==23375== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==23375== malloc/free: in use at exit: 0 bytes in 0 blocks. ==23375== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==23375== For counts of detected errors, rerun with: -v ==23375== No malloc'd blocks -- no leaks are possible. Illegal instruction

Reply by email

Florian Klaempfl
to Dominique Leducq
Show quoted text 79 lines
Florian Klaempfl a écrit : > Leducq Dominique wrote: > >> Le Vendredi 8 Septembre 2006 12:06, Peter Vreman a écrit : >> >>>> Le Jeudi 7 Septembre 2006 20:42, Peter Vreman a écrit : >>>> >>>>>> I can't figure out how to get source code filename & line numbers in >>>>>> Valgrind output. What is the correct flags association ? >>>>>> >>>>>> I tried -gv, -gv -g, -gv -gw, -gv -gl,... >>>>>> >>>>>> I'm using Valgrind 3.2.0 in Debian Etch GNU/linux for x86_64, Fpc >>>>>> >>>>> 2.4.0 >>>>> >>>>> valgrind for x86_64 is not tested yet with fpc. >>>>> >>>> Well, I can help with testing... Perhaps I could even help with >>>> adapt the >>>> code, should someone guide me and point me to relevant doc and code. >>>> >>> For 64bit systems we are only going to support the dwarf (-gw) >>> debuginfo >>> format. Code for that is only available in 2.1.1 in the file >>> dbgdwarf.pas. >>> >>> >>> >> As I understand it, it is not yet supported at all ? Is there a way >> for me to help ? >> > > Test and help 2.1.1 fixing so we get 2.2.0 out soon. The dwarf support > isn't > merged back to 2.0.4. > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > I reply on this list, which seems more appropriate, given the turn of the thread. I just compiled the current 2.1.1 snapshot, and tried to compile a dumb program with it ( with -gw -gv) and run it under valgrind for x86_64 I got the following result : test]$ /home/dleducq/fpc-2.1.1-20060908/lib/fpc/2.1.1/ppcx64 -gw -gv testvalgr.pas -Fu/home/dleducq/fpc-2.1.1-20060908/lib/fpc/2.1.1/units/x86_64-linux/rtl Free Pascal Compiler version 2.1.1 [2006/09/08] for x86_64 Copyright (c) 1993-2006 by Florian Klaempfl Target OS: Linux for x86-64 Compiling testvalgr.pas Linking testvalgr 10 lines compiled, 0.0 sec test]$ valgrind ./testvalgr ==23375== Memcheck, a memory error detector. ==23375== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==23375== Using LibVEX rev 1367, a library for dynamic binary translation. ==23375== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==23375== Using valgrind-3.0.1, a dynamic binary instrumentation framework. ==23375== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==23375== For more details, rerun with: -v ==23375== vex amd64->IR: unhandled instruction bytes: 0xDB 0xE3 0x9B 0xD9 ==23375== ==23375== Process terminating with default action of signal 4 (SIGILL) ==23375== Illegal opcode at address 0x4007D8 ==23375== at 0x4007D8: SYSTEM_SYSRESETFPU (in /home/dleducq/src/test/testvalgr) ==23375== by 0x4004F0: (within /home/dleducq/src/test/testvalgr) ==23375== ==23375== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4) ==23375== malloc/free: in use at exit: 0 bytes in 0 blocks. ==23375== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==23375== For counts of detected errors, rerun with: -v ==23375== No malloc'd blocks -- no leaks are possible.

Now I remember :) valgrind doesn't support all x86_64 instructions :(

Reply by email

Leducq Dominique
to Florian Klaempfl

Le Samedi 9 Septembre 2006 12:37, Florian Klaempfl a écrit :

Show quoted text 5 lines
Florian Klaempfl schrieb: > Now I remember :) valgrind doesn't support all x86_64 instructions :( Well, I just checked change logs, you need at least 3.1.0

Right, with 3.2.0 it runs without problems, just not taking debug info into account.

_______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email