HNHacker News
TopNewBestAskShowJobs

smeso

23 karma · joined October 19, 2017

https://smeso.it
submissionscomments
smeso··on MIPS stacktrace: an unexpected journey
Not after the final link, but I'm pretty sure we were using `-fdata-sections -ffunction-sections -Wl,--gc-sections`. I think that would strip any unwind section too, if it was present. Wouldn't it? Anyway, we likely didn't generate them in the first place.
smeso··on MIPS stacktrace: an unexpected journey
I believe it does. But adding a new external dependency at the time wasn't an option. Also I expected this whole thing to be far easier than what it turned out to be and adding a library just for this seemed overkill. When I found out the truth, it was already too late :)
smeso··on MIPS stacktrace: an unexpected journey
We didn't have a lot of available space, so all binaries deployed were stripped and we didn't ship any additional debug information. Hence why I left the DWARF parsing as an "exercise for the reader", I didn't do it back then. I had to use addr2line on my PC with the debug data I had locally.
smeso··on MIPS stacktrace: an unexpected journey
The list of supported instructions was built empirically, by looking at the code that GCC was actually generating for functions' prologues. Luckily there wasn't a lot of variation, but YMMV.