Re: [go-nuts] user process instruction pointer symbol lookup

2024-06-20 Thread Massimiliano Giovagnoli
Thank you all. I was looking at the same goal, having collected stack traces from eBPF helper with IPs. With debug/elf I've been able to resolve symbols for the use cases I tested, thank you Ian. In example the right symbol is the one that satisfy ip >= sym.Value && ip < (sym.Value+sym.Size) (

Re: [go-nuts] user process instruction pointer symbol lookup

2024-04-03 Thread 'TheDiveO' via golang-nuts
Thank you Ian! Not sure yet if I found something useful related to the real process addresses/offsets, but at least the "bcc" sources have one "bcc_elf_get_text_scn_info()" that returns the address and offset of the ".text" section. On Tuesday, April 2, 2024 at 8:01:11 PM UTC+2 Ian Lance Taylo

Re: [go-nuts] user process instruction pointer symbol lookup

2024-04-02 Thread Ian Lance Taylor
On Tue, Apr 2, 2024 at 2:35 AM 'TheDiveO' via golang-nuts wrote: > > On Linux, given an arbitrary binary executable with symbol information in the > executable, how can I lookup an instruction pointer address to get the > corresponding symbol name? > > The binary (and its process) isn't a Go bin

[go-nuts] user process instruction pointer symbol lookup

2024-04-02 Thread 'TheDiveO' via golang-nuts
On Linux, given an arbitrary binary executable with symbol information in the executable, how can I lookup an instruction pointer address to get the corresponding symbol name? The binary (and its process) isn't a Go binary, but any arbitrary executable. The stack unwinding has already been done