On Tue, Mar 22, 2022 at 7:46 AM Yarden Laifenfeld <ylaifenf...@gmail.com> wrote: > > https://goplay.space/#6BZX0IDRm76 > This is my code, on elf files it works but macho it doesn't. I don't see any > difference between what I did and the implementation in cmd/internal/objfile.
Yes, that looks OK to me. I don't have a mac, though. Can you print out the table.Files map? Ian > On Tuesday, March 22, 2022 at 4:30:28 PM UTC+2 Ian Lance Taylor wrote: >> >> On Tue, Mar 22, 2022 at 3:32 AM Yarden Laifenfeld <ylaif...@gmail.com> wrote: >> > >> > I'm trying to use the LineToPC function (in gosym) on a mach-o file but it >> > always fails, even though the __gopclntab section of my mach-o file does >> > seem populated. It works perfectly well on ELF files, and I also saw the >> > tests for the function in the golang repo are specifically for ELFs. Is >> > this on purpose? Do I have to parse the .debug_line section in order to >> > get the pc for a given filename, lineno? >> >> How are you building the gosym.Table data structure? In case you >> haven't seen it, there is example code that may help in the >> cmd/internal/objfile package. >> >> Ian > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/002dee87-d474-45b3-a0d8-3498062d4fe6n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcU2mGNcabbV952_8ujApqDz1RGOxMMBDTsADd-nE1Zmxg%40mail.gmail.com.