Summary: | [PATCH v2] search additional path for debug symbols | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Alex Chiang <achiang> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kyle.nitzsche |
Priority: | NOR | ||
Version: | 3.9.0.SVN | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
include-debugsyms-path-v2.patch
include-debugsyms-path-v3.patch |
Description
Alex Chiang
2012-11-28 00:09:05 UTC
Alex, thanks for the patch. Sorry to arrive late to the discussion. Patch looks good. One question about its behaviour, though. As you noticed, on Android I added an ad-hoc hack which looks for debuginfo for /foo/bar/xyzzy.so in /sdcard/symbols/foo/bar/xyzzy.so. In other words, it adds the prefix "/sdcard/symbols" to full path of the object to the prefix and not just the to object's filename -- in which case it would look for "/sdcard/symbols/xyzzy.so". Does your patch behave the same? The real question is: can the patch be used as a direct replacement for the Android hack, if I give the argument --include-debugsyms-path=/sdcard/symbols ? One final minor comment is, I think I would prefer to use the name --extra-debuginfo-path=, so as to avoid the possibility of confusing (presumably already confused) users into thinking that this is somehow related to include files. Which it isn't. Created attachment 75553 [details]
include-debugsyms-path-v3.patch
Hi Julian,
I've updated the patch to use your suggested name.
As to whether the patch can replace the android hack directly, the answer is "maybe". One difference in the ad hoc search vs. the normal search is in the calls to dinfo_zalloc(). I confess, the differences in the arguments "di.fdf.2", "di.fdf.3", and "di.fahdi.1" are a complete mystery to me.
I tried grokking the arena_malloc() code but failed completely.
I would say that if a "charge center" has nothing to do with some path encoded in an elf header, then yes, the new argument could be used as a direct replacement for the ad hoc symbol searching function.
You could pass --extra-debuginfo-path=/sdcard/symbols/ and it should pick up "/foo/bar/xyzzy.so" from the object.
Hopefully that question doesn't block this particular patch from going in though. :)
Thanks!
Committed, r13154. Thanks for the patch. Need to add a fix to the documentation before closing. Documentation patch sent via email and applied to trunk as r13169. Closing out bug. |