-
Notifications
You must be signed in to change notification settings - Fork 31
Account for inlined frames from blazesym #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Testing with:
```go
symbolizer, err := blazesym.NewSymbolizer()
if err != nil {
panic(err)
}
syms, err := symbolizer.Symbolize(3061398, []uint64{0x5639d417c164})
if err != nil {
panic(err)
}
for _, sym := range syms {
fmt.Printf("%#v\n", sym)
}
```
Here's the output:
```
blazesym.Symbol{Name:"outie", File:"derp.c", Dir:"/home/ivan/.", Line:16, Column:10, Offset:13}
blazesym.Symbol{Name:"middle", File:"derp.c", Dir:"/home/ivan/.", Line:12, Column:10, Offset:0}
```
It matches blazecli:
```
$ sudo ../target/debug/blazecli symbolize process --pid 3061398 0x5639d417c164
0x005639d417c164: outie @ 0x1157+0xd /home/ivan/./derp.c:16:10
middle @ /home/ivan/./derp.c:12:10 [inlined]
```
|
I find myself needing ELF based symbolication and I think this needs to be a standalone Go library. I can make one, but perhaps facebook people should own it instead, given that they own blazesym itself? @d-e-s-o, let me know what you think. |
|
@bobrik I don't think we are going to maintain a second symbolization library just for the sake of having a pure Go implementation, assuming that is what you are asking. Can you help me better understand what the problem you are facing is? |
|
I'm not suggesting a pure Go library. My suggestion is a Go wrapper around C bindings, same as we have here, but in a separate project just for blazesym (as opposed to a part of facebook/dns). The problem I'm facing is that I would like to use blazesym from Go. The only Go library is a part of facebook/dns here: It is weird to import facebook/dns for symbolication and it's quite limited in what it actually provides at the moment. |
|
@virtyaluk has imported this pull request. If you are a Meta employee, you can view this in D89894658. |
|
I see; different "standalone" then. Yeah, that would make sense. I think we can provide "official" bindings that reside in the I think the main hurdle/questionmark from my perspective would be how to make the Rust usage transparent to users, so I suspect that will need a bit more discussion. I am being told that perhaps pre-built binaries may be the most idiomatic way to go, but I don't have the necessary Go-overview here. |
|
I made libbpf/blazesym#1402. Lets move the discussion there. |
|
@virtyaluk merged this pull request in e43fa1f. |
Testing with:
Here's the output:
It matches blazecli: