Skip to content
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

invoke a debugger instead of going via addr2line and friends #579

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

MichaelRawson
Copy link
Contributor

In #412 I (perhaps foolishly, in hindsight) removed the CALL mechanism with some code that found stack frames, then asked the system to resolve them to function names. This had a lot of benefits, but it was a bit flaky and had to be improved in #504 so that we shell out to addr2line.

This worked, but in itself was also flaky in the presence of ASLR, which is becoming harder to avoid. On ARM Macs, for example, it seems you can't switch it off easily.

So: since we already shell out to a program, why not use something designed for this? Replace the whole mess with invocations of gdb or lldb in their batch modes to get a backtrace. This should (hopefully) be the last attempt in this sorry saga.

Things still to check:

@MichaelRawson
Copy link
Contributor Author

No dice on StarExec. Not sure if we care.

@quickbeam123
Copy link
Collaborator

Will try to investigate a bit more, but currently, this kills my terminal with
terminal.txt

@MichaelRawson
Copy link
Contributor Author

...your actual terminal emulator dies, right? I have no idea what to do about that, sorry. If you redirect output to a file does it perhaps not crash the terminal?

@quickbeam123 quickbeam123 merged commit a6de668 into master Sep 6, 2024
1 check passed
@quickbeam123 quickbeam123 deleted the michael-debugger-tracebacks branch September 6, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants