Commit Graph

704 Commits

Author SHA1 Message Date
Jeremy
d1199dc325
Fix potential null dereference issue, thanks @eyalgolan1337. Resolves #106. 2024-03-20 22:08:21 -05:00
Jeremy
8f8e1e34e2
Re-add CE button on readme 2024-03-19 22:59:50 -05:00
Billy O'Neal
37e6cef4f9
Defend against min and max macros from windows.h (#105)
Alternative to
https://github.com/microsoft/vcpkg/pull/37512/files#diff-9f533b43a5faabaa6b5a0e046f0ae425cd85736808604dd61dc9a955db3d060aR9

I left the examples in mach-o.hpp as they are guarded by #if IS_APPLE
2024-03-18 23:03:26 -05:00
Jeremy
2985cb1d6c
Merge branch 'main' into dev 2024-03-16 23:31:57 -05:00
Jeremy
fdf4499259
Update docs to showcase source code snippets 2024-03-16 23:31:07 -05:00
Jeremy
c5138e2f40
Add nominmax for windows.h 2024-03-16 19:34:16 -05:00
Jeremy
a841a1b74a
Fix msvc warning treated as error 2024-03-16 19:23:03 -05:00
Jeremy
9b69d200c1
Bump to v0.5.0 2024-03-16 18:03:34 -05:00
Jeremy
8407adf6d3
Add print_with_snippets to docs 2024-03-16 17:52:38 -05:00
Jeremy
a528aa8e0b
Fix object address resolution with _dl_find_object, #104 2024-03-16 16:17:27 -05:00
Jeremy
92be6c23f1
Update note about debug symbols being needed 2024-03-15 17:39:23 -05:00
Jeremy
6a8ff75fc1
Merge branch 'main' into dev 2024-03-09 22:26:17 -06:00
Jeremy
c35392d20b
Fix comment 2024-03-09 22:25:51 -06:00
Jeremy
754c588464
Disable CE button temporarily 2024-03-09 22:25:04 -06:00
Jeremy
3e0689a5e6
Resolve object address for dbghelp frames by default, handles #100 2024-03-09 22:15:41 -06:00
Jeremy
8d6326da07
Update locking in dbghelp_syminit_manager 2024-03-08 17:39:08 -06:00
Jeremy
c896d70f79
Small reorganization 2024-03-05 17:47:55 -06:00
Adrien Cassagne
d8e23c1e93
Add 'POSITION_INDEPENDENT_CODE ON' (also known as '-fPIE'). (#99)
First thx for these very useful lib!

I encountered some issues when linking with `libcpptrace`. Typically,
here is the error I got:
```
/usr/bin/ld: lib/cpptrace/lib/libcpptrace.a(cpptrace.cpp.o): relocation R_X86_64_32S against symbol `_ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE@@GLIBCXX_3.4.21' can not be used when making a PIE object; recompile with -fPIE
```
I just added the `POSITION_INDEPENDENT_CODE ON` flag on the targets, and
now it works like a charm :-).
2024-03-05 08:57:04 -06:00
Jeremy
3054b3bebd
Add tmp to gitignore 2024-03-03 14:37:14 -06:00
Jeremy
da739d30c5
Add can_signal_safe_unwind and update some documentation surrounding signal-safe stack tracing 2024-03-03 12:15:27 -06:00
Jeremy
ec264aa0eb
Cleanup and improve snippet code a bit 2024-03-03 11:49:15 -06:00
Jeremy
862b546532
Update margin handling 2024-03-03 11:34:09 -06:00
Jeremy
9da2b3f556
Refactor object.hpp, separate out module base logic which greatly cleans things up 2024-03-03 11:31:06 -06:00
Jeremy
f11e119d32
Refactor stacktrace conversion code 2024-03-03 10:54:23 -06:00
Jeremy
389f788b57
Add get_object_info method to stacktrace frames, adding onto the previous work for #97 2024-03-03 10:54:03 -06:00
Jeremy
123e7df4f4
Mention CPPTRACE_STATIC_DEFINE for non-cmake instructions 2024-02-28 23:32:48 -06:00
Jeremy
42a91af570
Remove some completed features from the todo list 2024-02-28 23:30:45 -06:00
Jeremy Rifkin
d99f1745d2
Basic source code snippet system (#98) 2024-02-28 23:29:24 -06:00
Jeremy
736643358b
Implement a non-recursive get_inlines_info 2024-02-28 22:30:47 -06:00
Jeremy
055e0d94cf
Use ccache if possible, at top-level 2024-02-28 22:09:54 -06:00
Jeremy
0fda4a88ed
Refactor stack trace frame printing 2024-02-28 20:53:28 -06:00
Jeremy
58992cbeb6
Bump to 0.4.1 2024-02-27 22:53:59 -06:00
Jeremy
a700b7f7ef
Update documentation for stacktrace_frames 2024-02-27 22:53:16 -06:00
Jeremy
c6a60f7172
Stratify test ci 2024-02-27 20:10:35 -06:00
Jeremy
76aff1c30e
Revert "Try something fancy"
This reverts commit df8b8eb4c8.
2024-02-27 19:55:42 -06:00
Jeremy
df8b8eb4c8
Try something fancy 2024-02-27 19:54:06 -06:00
Jeremy
6e01f7225d
Try to rework ci to test first the default configuration, then test all configs after that passes. Also refactor the build in all tests script. 2024-02-27 19:51:52 -06:00
Jeremy
e0b50c96b4
Refactor out prerequisite setup to scripts in ci/ 2024-02-27 19:41:34 -06:00
Jeremy
a31d35c04e
Fixes 2024-02-27 19:12:55 -06:00
Jeremy
a24c140baf
Add object address resolution for libdl backend 2024-02-27 19:00:08 -06:00
Jeremy
d17fe33abf
Try to fix build errors 2024-02-27 00:39:58 -06:00
Jeremy
3c7a677689
Add an object address to stacktrace_frame entries, addresses #97 (no pun intended) 2024-02-27 00:34:45 -06:00
Jeremy
d5b2646283
Merge branch 'main' into dev 2024-02-27 00:23:10 -06:00
Jeremy
fc770a764e
Small readme fix 2024-02-27 00:22:50 -06:00
Jeremy
b7d14bc952
Only deal with zstd if not using CPPTRACE_USE_EXTERNAL_LIBDWARF 2024-02-19 16:46:48 -06:00
Jeremy
a162423800
Update conan config to not use nested dwarf header path 2024-02-19 10:39:07 -06:00
Bruce Mitchener
f879cd8b7b
README: improve text about macOS and dsymutil (#93)
According to the release notes, I think this is true ... if not,
disregard!
2024-02-19 02:11:33 -06:00
Bruce Mitchener
a144002bf0
Tweaks from clang-tidy (#92)
This is (perhaps) mainly for discussion as I saw you removed
`clang-tidy` checks last year. These fix a variety of minor things.

With one of the options that I was using, these still remain:

```
/Users/bruce/Development/custodian/cpptrace/src/symbols/../utils/utils.hpp:235:22: warning: noexcept specifier on the move constructor evaluates to 'false' [performance-noexcept-move-constructor]
  235 |             noexcept(std::is_nothrow_move_constructible<T>::value)
      |                      ^
/Users/bruce/Development/custodian/cpptrace/src/symbols/../utils/utils.hpp:250:64: warning: noexcept specifier on the move assignment operator evaluates to 'false' [performance-noexcept-move-constructor]
  250 |             noexcept(std::is_nothrow_move_assignable<T>::value && std::is_nothrow_move_constructible<T>::value)
      |                                                                ^
```
2024-02-18 11:21:48 -06:00
Bruce Mitchener
1488460172
Use defined(CPPTRACE_HAS_CXX_EXCEPTION_TYPE). (#94)
This is set by the build system when it is available and not set when
not available (and not set to 1/0 respectively).

The current code can generate a warning when this preprocessor
definition is not defined.
2024-02-18 11:16:04 -06:00
Bruce Mitchener
9296b892ac
ci: Update ilammy/msvc-dev-cmd to 1.13 from 1.10. (#91)
This should remove most of the warnings about using older versions of
NodeJS.
2024-02-18 10:48:12 -06:00