Pierre-Olivier Gaillard
2008-May-02 18:57 UTC
[dtrace-discuss] Translating addresses when program is dead
Hi, This is not strictly a dtrace question, but I would like to find the function names corresponding to a list of addresses once a process is dead. I understand that using the -p option of dtrace helps avoid that need in the first place but I keep running across situations where I only get the addresses and the binary (e.g. pstack from core on Solaris 10 where the addresses did not get translated due to a pstack bug). Is there some utility in Solaris to do that (a bit like the gnu addr2line but for binaries without debug symbols) ? Or should I just nm the binary and find the matching functions? addr2lin Thanks a lot and sorry if this is a bit off topic. Pierre-Olivier -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20080502/1d664083/attachment.html>
Adam Leventhal
2008-May-02 19:35 UTC
[dtrace-discuss] Translating addresses when program is dead
For a core file, pstack and mdb should always get the right symbols unless the binaries have changed. Adding the symbol table to the core file content can further ensure that symbols will come out correctly; check out coreadm(1M). Adam On May 2, 2008, at 11:57 AM, Pierre-Olivier Gaillard wrote:> Hi, > > This is not strictly a dtrace question, but I would like to find the > function names corresponding to a list of addresses once a process > is dead. > I understand that using the -p option of dtrace helps avoid that > need in the first place but I keep running across situations where I > only get the addresses and the binary (e.g. pstack from core on > Solaris 10 where the addresses did not get translated due to a > pstack bug). > > Is there some utility in Solaris to do that (a bit like the gnu > addr2line but for binaries without debug symbols) ? Or should I just > nm the binary and find the matching functions? addr2lin > > Thanks a lot and sorry if this is a bit off topic. > > Pierre-Olivier > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
Pierre-Olivier Gaillard
2008-May-05 20:37 UTC
[dtrace-discuss] Translating addresses when program is dead
Hi, I was trying to work without the core file. The solution is actually fairly simple : just dbx <executable> and examine the addresses that I want resolved. It''s not as easy as addr2line but almost. Thanks a lot, On Fri, May 2, 2008 at 3:35 PM, Adam Leventhal <ahl at eng.sun.com> wrote:> For a core file, pstack and mdb should always get the right symbols unless > the binaries have changed. Adding the symbol table to the core file content > can further ensure that symbols will come out correctly; check out > coreadm(1M). > > Adam > > > On May 2, 2008, at 11:57 AM, Pierre-Olivier Gaillard wrote: > > Hi, > > > > This is not strictly a dtrace question, but I would like to find the > > function names corresponding to a list of addresses once a process is dead. > > I understand that using the -p option of dtrace helps avoid that need in > > the first place but I keep running across situations where I only get the > > addresses and the binary (e.g. pstack from core on Solaris 10 where the > > addresses did not get translated due to a pstack bug). > > > > Is there some utility in Solaris to do that (a bit like the gnu > > addr2line but for binaries without debug symbols) ? Or should I just nm the > > binary and find the matching functions? addr2lin > > > > Thanks a lot and sorry if this is a bit off topic. > > > > Pierre-Olivier > > > > > > _______________________________________________ > > dtrace-discuss mailing list > > dtrace-discuss at opensolaris.org > > > > > -- > Adam Leventhal, Fishworks http://blogs.sun.com/ahl > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20080505/401ef407/attachment.html>