-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f0e95a
commit efcba6e
Showing
3 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
00~快速开始/应用调试/2024~How to build highly-debuggable C++ binaries.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
File renamed without changes.
File renamed without changes.