Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49147 - valgrind 2.0.0 GDB attach fails backtrace command
Summary: valgrind 2.0.0 GDB attach fails backtrace command
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-27 04:24 UTC by Graham Hudspith
Modified: 2004-05-15 10:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixed ebuild for valgrind 2.0.0 (valgrind-2.0.0-r1.ebuild,1.04 KB, application/octet-stream)
2004-04-27 04:24 UTC, Graham Hudspith
Details
Fixed ebuild for valgrind 2.0.0 (valgrind-2.0.0-r1.ebuild,868 bytes, text/plain)
2004-05-08 02:28 UTC, Graham Hudspith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Hudspith 2004-04-27 04:24:02 UTC
This applies to all versions of valgrind, actually.

If I start valgrind in "attach gdb to process when error encountered" mode (aka --gdb-attach=yes), when an error IS encountered and gdb has been started and attached, trying to run the backtrace command inside gdb produces a gobbledegook stack-trace.

If I configure, build and install valgrind 2.0.0 myself, then everything works fine.

After much diffing, finally worked out that this is because the valgrind binaries and shared-libraries are stripped during the emerge, and this loss of symbolic information is quite crucial in valgrind's case!

Simple fix is to add the following lines to ALL of the valgrind ebuild files:

    # Do _NOT_ strip symbols in the build!
    RESTRICT="nostrip"

I added them AFTER the following line in the 2.0.0 ebuild file:

    inherit flag-o-matic

I'm attaching a modified ebuild for a proposed 2.0.0-r1 version. This is the same as the existing 2.0.0 except for the added "nostrip" lines. However, I have also rejigged the ebuild to bring it more inline with those for 2.1.0 and 2.1.1.

I repeat, similar fixes (i.e. adding the "nostrip" line) are needed in the 2.1.0 and 2.1.1 ebuilds. However, I can't be bothered to do this since those builds are currently broken for other reasons (see http://bugs.gentoo.org/show_bug.cgi?id=49084).


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Graham Hudspith 2004-04-27 04:24:55 UTC
Created attachment 30140 [details]
Fixed ebuild for valgrind 2.0.0
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2004-05-01 14:32:13 UTC
reattach the patch as text-plain please.
Comment 3 Graham Hudspith 2004-05-08 02:28:21 UTC
Created attachment 30987 [details]
Fixed ebuild for valgrind 2.0.0

Re-attached new ebuild as plain text. Now identical to 2.1.1 ebuild, bar my
changes and addition of eutils inheritance (which was added to 2.0.0 ebuild by
Aron Griffis but not to 2.1.0 or 2.1.1).
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2004-05-15 10:33:30 UTC
added to valgrind ebuilds - thanks for the report.