Skip to content

Conversation

@icex2
Copy link
Contributor

@icex2 icex2 commented Jan 31, 2024

Split out from #278.
Introduces nice stacktraces using the dwarf symbols generated by mingw. The current implementation works but isn't optimal as it requires an additional library. Following up to this with making it optional and load it dynamically somehow.

icex2 added 4 commits January 31, 2024 21:21
We want this to always be visible, so the log level must be
the highest possible. Unfortunately, that's quite the hack
around the existing API and how fatal behaves.

The log API stopped scaling already a while ago and needs
considerable refactoring to consider the various use-cases
that emerged since it was first created on alpha versions
of bemanitools.
Because we are using mingw, we can't just use window's
dbghelp library as the symbols created are in dwarf format.

Fortunately, the dwarfstack library already provides all the
facilities to easily print very descriptive stacktraces,
including function names, file names and line numbers,
when dwarf symbols are available.

This moves the incomplete exception handling portion from
signal to a separate module as well to improve scoping.
Adjust inject to utilize the new feature. This also
requires including the dwarfstack.dll in all distribution
packages.
Expecting to improve debugability significantly. Stacktraces
can be enhanced with function names, file names and line
numbers when symbols are included in all exe and dll files.

Furthermore, this also improves debugger usage as symbols
can be imported to help navigate disassembly/decompiled code.
@icex2 icex2 changed the base branch from master to development February 19, 2024 09:33
@icex2
Copy link
Contributor Author

icex2 commented Feb 19, 2024

Decided to start pushing changes of my on-going refactoring and development streak to a dedicated development branch. The blast radius of all these changes is very large and everything needs extensive testing once I am somewhat "done" with the main development work. Avoid disruptions on master to still allow pushing bugfixes and allow releases.

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.

1 participant