Valgrind can't find debug symbols, even with --extra-debuginfo-path
I'm attempting to install Valgrind on an embedded Debian-based PowerPC system. I've managed to cross-compile it successfully, but now it's complaining that it can't find debug information. I've put non-stripped copies of the relevant shared objects onto the filesystem and informed Valgrind of this directory, but it's still not working.
Invocation:
root@192.168.0.200:/# /root/valgrind/bin/valgrind --extra-debuginfo-path=/root/valgrind/usr/lib/debug /path/to/my_program -log
==6000== Memcheck, a memory error detector
==6000== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6000== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==6000== Command: /path/to/my_program -log
==6000==
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld.so.1
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld.so.1
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
The offending file, ld.so.1
, is in /lib
, and my non-stripped copies are in a separate directory:
root@192.168.0.200:/# find / -name ld.so.1
/lib/ld.so.1
/root/valgrind/usr/lib/debug/ld.so.1
/root/valgrind/usr/lib/debug/lib/ld.so.1
My non-stripped copies from libc6-dbg_2.7-10ubuntu3_powerpc.deb
appear to be compatible:
root@192.168.0.200:/# file /lib/ld.so.1 /root/valgrind/usr/lib/debug/ld.so.1 /root/valgrind/usr/lib/debug/lib/ld.so.1
/lib/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/lib/ld.so.1: symbolic link to `ld-2.7.so'
root@192.168.0.200:/# file /lib/ld-2.7.so /root/valgrind/usr/lib/debug/ld-2.7.so /root/valgrind/usr/lib/debug/lib/ld-2.7.so
/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0x11676e75, with unknown capability 0x10000 = 0x90401, stripped
/root/valgrind/usr/lib/debug/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, not stripped
/root/valgrind/usr/lib/debug/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), statically linked, not stripped
And if I understand how objdump
works, it seems like the "must-be-redirected function" mentioned by Valgrind does indeed have an entry in the debug copy:
root@192.168.0.200:/# objdump -x /lib/ld-2.7.so | grep strlen
root@192.168.0.200:/# objdump -x /root/valgrind/usr/lib/debug/lib/ld-2.7.so | grep strlen
0002f734 l O .data.rel.ro 00000004 max_capstrlen
00018ff0 l F .text 000000b8 strlen
And yet the --extra-debuginfo-path
argument has no effect. There's a brief mention of this switch in the manual, but this is practically all the information I've been able to find about it. Am I missing something else?
For the record, this machine cannot connect to the Internet, so letting apt
/ dpkg
take care of things is sadly out of the question. /lib
and most other system directories are also mounted read-only, so I can't just drop in a non-stripped replacement for ld-2.7.so
(not that I would take such a risk).
debian debug powerpc valgrind
add a comment |
I'm attempting to install Valgrind on an embedded Debian-based PowerPC system. I've managed to cross-compile it successfully, but now it's complaining that it can't find debug information. I've put non-stripped copies of the relevant shared objects onto the filesystem and informed Valgrind of this directory, but it's still not working.
Invocation:
root@192.168.0.200:/# /root/valgrind/bin/valgrind --extra-debuginfo-path=/root/valgrind/usr/lib/debug /path/to/my_program -log
==6000== Memcheck, a memory error detector
==6000== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6000== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==6000== Command: /path/to/my_program -log
==6000==
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld.so.1
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld.so.1
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
The offending file, ld.so.1
, is in /lib
, and my non-stripped copies are in a separate directory:
root@192.168.0.200:/# find / -name ld.so.1
/lib/ld.so.1
/root/valgrind/usr/lib/debug/ld.so.1
/root/valgrind/usr/lib/debug/lib/ld.so.1
My non-stripped copies from libc6-dbg_2.7-10ubuntu3_powerpc.deb
appear to be compatible:
root@192.168.0.200:/# file /lib/ld.so.1 /root/valgrind/usr/lib/debug/ld.so.1 /root/valgrind/usr/lib/debug/lib/ld.so.1
/lib/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/lib/ld.so.1: symbolic link to `ld-2.7.so'
root@192.168.0.200:/# file /lib/ld-2.7.so /root/valgrind/usr/lib/debug/ld-2.7.so /root/valgrind/usr/lib/debug/lib/ld-2.7.so
/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0x11676e75, with unknown capability 0x10000 = 0x90401, stripped
/root/valgrind/usr/lib/debug/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, not stripped
/root/valgrind/usr/lib/debug/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), statically linked, not stripped
And if I understand how objdump
works, it seems like the "must-be-redirected function" mentioned by Valgrind does indeed have an entry in the debug copy:
root@192.168.0.200:/# objdump -x /lib/ld-2.7.so | grep strlen
root@192.168.0.200:/# objdump -x /root/valgrind/usr/lib/debug/lib/ld-2.7.so | grep strlen
0002f734 l O .data.rel.ro 00000004 max_capstrlen
00018ff0 l F .text 000000b8 strlen
And yet the --extra-debuginfo-path
argument has no effect. There's a brief mention of this switch in the manual, but this is practically all the information I've been able to find about it. Am I missing something else?
For the record, this machine cannot connect to the Internet, so letting apt
/ dpkg
take care of things is sadly out of the question. /lib
and most other system directories are also mounted read-only, so I can't just drop in a non-stripped replacement for ld-2.7.so
(not that I would take such a risk).
debian debug powerpc valgrind
add a comment |
I'm attempting to install Valgrind on an embedded Debian-based PowerPC system. I've managed to cross-compile it successfully, but now it's complaining that it can't find debug information. I've put non-stripped copies of the relevant shared objects onto the filesystem and informed Valgrind of this directory, but it's still not working.
Invocation:
root@192.168.0.200:/# /root/valgrind/bin/valgrind --extra-debuginfo-path=/root/valgrind/usr/lib/debug /path/to/my_program -log
==6000== Memcheck, a memory error detector
==6000== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6000== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==6000== Command: /path/to/my_program -log
==6000==
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld.so.1
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld.so.1
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
The offending file, ld.so.1
, is in /lib
, and my non-stripped copies are in a separate directory:
root@192.168.0.200:/# find / -name ld.so.1
/lib/ld.so.1
/root/valgrind/usr/lib/debug/ld.so.1
/root/valgrind/usr/lib/debug/lib/ld.so.1
My non-stripped copies from libc6-dbg_2.7-10ubuntu3_powerpc.deb
appear to be compatible:
root@192.168.0.200:/# file /lib/ld.so.1 /root/valgrind/usr/lib/debug/ld.so.1 /root/valgrind/usr/lib/debug/lib/ld.so.1
/lib/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/lib/ld.so.1: symbolic link to `ld-2.7.so'
root@192.168.0.200:/# file /lib/ld-2.7.so /root/valgrind/usr/lib/debug/ld-2.7.so /root/valgrind/usr/lib/debug/lib/ld-2.7.so
/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0x11676e75, with unknown capability 0x10000 = 0x90401, stripped
/root/valgrind/usr/lib/debug/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, not stripped
/root/valgrind/usr/lib/debug/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), statically linked, not stripped
And if I understand how objdump
works, it seems like the "must-be-redirected function" mentioned by Valgrind does indeed have an entry in the debug copy:
root@192.168.0.200:/# objdump -x /lib/ld-2.7.so | grep strlen
root@192.168.0.200:/# objdump -x /root/valgrind/usr/lib/debug/lib/ld-2.7.so | grep strlen
0002f734 l O .data.rel.ro 00000004 max_capstrlen
00018ff0 l F .text 000000b8 strlen
And yet the --extra-debuginfo-path
argument has no effect. There's a brief mention of this switch in the manual, but this is practically all the information I've been able to find about it. Am I missing something else?
For the record, this machine cannot connect to the Internet, so letting apt
/ dpkg
take care of things is sadly out of the question. /lib
and most other system directories are also mounted read-only, so I can't just drop in a non-stripped replacement for ld-2.7.so
(not that I would take such a risk).
debian debug powerpc valgrind
I'm attempting to install Valgrind on an embedded Debian-based PowerPC system. I've managed to cross-compile it successfully, but now it's complaining that it can't find debug information. I've put non-stripped copies of the relevant shared objects onto the filesystem and informed Valgrind of this directory, but it's still not working.
Invocation:
root@192.168.0.200:/# /root/valgrind/bin/valgrind --extra-debuginfo-path=/root/valgrind/usr/lib/debug /path/to/my_program -log
==6000== Memcheck, a memory error detector
==6000== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==6000== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==6000== Command: /path/to/my_program -log
==6000==
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld.so.1
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld.so.1
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
The offending file, ld.so.1
, is in /lib
, and my non-stripped copies are in a separate directory:
root@192.168.0.200:/# find / -name ld.so.1
/lib/ld.so.1
/root/valgrind/usr/lib/debug/ld.so.1
/root/valgrind/usr/lib/debug/lib/ld.so.1
My non-stripped copies from libc6-dbg_2.7-10ubuntu3_powerpc.deb
appear to be compatible:
root@192.168.0.200:/# file /lib/ld.so.1 /root/valgrind/usr/lib/debug/ld.so.1 /root/valgrind/usr/lib/debug/lib/ld.so.1
/lib/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/ld.so.1: symbolic link to `ld-2.7.so'
/root/valgrind/usr/lib/debug/lib/ld.so.1: symbolic link to `ld-2.7.so'
root@192.168.0.200:/# file /lib/ld-2.7.so /root/valgrind/usr/lib/debug/ld-2.7.so /root/valgrind/usr/lib/debug/lib/ld-2.7.so
/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0x11676e75, with unknown capability 0x10000 = 0x90401, stripped
/root/valgrind/usr/lib/debug/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, not stripped
/root/valgrind/usr/lib/debug/lib/ld-2.7.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), statically linked, not stripped
And if I understand how objdump
works, it seems like the "must-be-redirected function" mentioned by Valgrind does indeed have an entry in the debug copy:
root@192.168.0.200:/# objdump -x /lib/ld-2.7.so | grep strlen
root@192.168.0.200:/# objdump -x /root/valgrind/usr/lib/debug/lib/ld-2.7.so | grep strlen
0002f734 l O .data.rel.ro 00000004 max_capstrlen
00018ff0 l F .text 000000b8 strlen
And yet the --extra-debuginfo-path
argument has no effect. There's a brief mention of this switch in the manual, but this is practically all the information I've been able to find about it. Am I missing something else?
For the record, this machine cannot connect to the Internet, so letting apt
/ dpkg
take care of things is sadly out of the question. /lib
and most other system directories are also mounted read-only, so I can't just drop in a non-stripped replacement for ld-2.7.so
(not that I would take such a risk).
debian debug powerpc valgrind
debian debug powerpc valgrind
asked Mar 31 '14 at 20:22
FraxtilFraxtil
8731710
8731710
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I had a similar issue, and adding --allow-mismatched-debuginfo=yes
parameter to valgrind solved the problem.
Interesting ...
– Pierre.Vriens
May 10 '17 at 9:24
That didn't work for me. I still get "???" instead of actual debug symbols.
– Geremia
Sep 19 '18 at 3:40
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f736048%2fvalgrind-cant-find-debug-symbols-even-with-extra-debuginfo-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I had a similar issue, and adding --allow-mismatched-debuginfo=yes
parameter to valgrind solved the problem.
Interesting ...
– Pierre.Vriens
May 10 '17 at 9:24
That didn't work for me. I still get "???" instead of actual debug symbols.
– Geremia
Sep 19 '18 at 3:40
add a comment |
I had a similar issue, and adding --allow-mismatched-debuginfo=yes
parameter to valgrind solved the problem.
Interesting ...
– Pierre.Vriens
May 10 '17 at 9:24
That didn't work for me. I still get "???" instead of actual debug symbols.
– Geremia
Sep 19 '18 at 3:40
add a comment |
I had a similar issue, and adding --allow-mismatched-debuginfo=yes
parameter to valgrind solved the problem.
I had a similar issue, and adding --allow-mismatched-debuginfo=yes
parameter to valgrind solved the problem.
answered May 10 '17 at 9:07
FerencFerenc
101
101
Interesting ...
– Pierre.Vriens
May 10 '17 at 9:24
That didn't work for me. I still get "???" instead of actual debug symbols.
– Geremia
Sep 19 '18 at 3:40
add a comment |
Interesting ...
– Pierre.Vriens
May 10 '17 at 9:24
That didn't work for me. I still get "???" instead of actual debug symbols.
– Geremia
Sep 19 '18 at 3:40
Interesting ...
– Pierre.Vriens
May 10 '17 at 9:24
Interesting ...
– Pierre.Vriens
May 10 '17 at 9:24
That didn't work for me. I still get "???" instead of actual debug symbols.
– Geremia
Sep 19 '18 at 3:40
That didn't work for me. I still get "???" instead of actual debug symbols.
– Geremia
Sep 19 '18 at 3:40
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f736048%2fvalgrind-cant-find-debug-symbols-even-with-extra-debuginfo-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown