Skip to content

Commit

Permalink
feat: update articles
Browse files Browse the repository at this point in the history
  • Loading branch information
wx-chevalier committed Aug 1, 2024
1 parent 9f0e95a commit efcba6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
> [Original article](https://dhashe.com/how-to-build-highly-debuggable-c-binaries.html) to build highly-debuggable C++ binaries, follow these steps:
>
> 1. **Enable Sanitizers:** Use `-fsanitize=address,undefined` for debugging memory and undefined behavior issues.
> 2. **Enable Debug Modes in Standard Libraries:** Use `-D_GLIBCXX_DEBUG` or `_LIBCPP_HARDENING_MODE` for enhanced checks.
> 3. **Generate Debug Info for Macros:** Add `-ggdb3` to capture macro definitions.
> 4. **Use Frame Pointers:** Add `-fno-omit-frame-pointer`.
> 5. **Enable Asynchronous Unwind Tables:** Add `-fasynchronous-unwind-tables`.
# How to build highly-debuggable C++ binaries

0 comments on commit efcba6e

Please sign in to comment.