Commit Graph

99 Commits

Author SHA1 Message Date
Tsche
fac4d08fd0
fix #221 (#223) 2025-02-28 10:55:44 -06:00
Jeremy Rifkin
5e4ea9a88f
Add lru cache unit tests 2025-02-18 00:01:30 -06:00
Jeremy Rifkin
ce97e0004d
Add basic option for shortening paths in the formatter 2025-02-13 23:22:12 -06:00
Jeremy Rifkin
b2180ae797
Rename builder methods 2025-02-02 16:58:22 -06:00
Jeremy Rifkin
eb83ee2a1c
Add an option to show / hide filtered frames vs printing a placeholder 2025-02-02 16:20:47 -06:00
Jeremy Rifkin
85be7c32a4
Some improvements to the nullable interface 2025-02-01 19:10:19 -06:00
Jeremy Rifkin
248ad447b1
Work around bazel crap 2025-02-01 18:54:44 -06:00
Jeremy Rifkin
eb9ebc31a7
Add tests for nullable 2025-02-01 17:51:17 -06:00
Jeremy Rifkin
e2b1252438
A new formatting setup (#208)
Resolves #164
2025-02-01 17:31:49 -06:00
Jeremy Rifkin
1429cfc429
Hopefully final ci fixes 2025-01-28 12:53:40 -06:00
Jeremy Rifkin
82ef2287dd
Fix CI 2025-01-28 11:32:58 -06:00
Jeremy Rifkin
f16c36e0b6
Do a unit test without debug symbols 2025-01-28 00:48:38 -06:00
Jeremy Rifkin
c5c785db89
Check that names passed to cpptrace::detail::demangle look like mangled names before passing to abi::__cxa_demangle 2025-01-27 23:48:13 -06:00
Jeremy Rifkin
c9826616b5
Sendit support optional<T&> and Result<T&, E> 2025-01-26 19:18:47 -06:00
Jeremy Rifkin
01ea4e9ea7
Update BUILD.bazel for test 2025-01-26 17:41:23 -06:00
Jeremy Rifkin
78086d0267
Some more unit tests for test cases 2025-01-26 17:29:38 -06:00
Jeremy Rifkin
906784284f
Add unit tests for optional and result helper types 2025-01-26 16:02:34 -06:00
Sergei Zimmerman
b23bc42df4
test(stacktrace): make CPPTRACE_FORCE_INLINE static (#196)
This fixes compilation error:

```
> error: inlining failed in call to 'always_inline' 'int stacktrace_inline_resolution_2(std::vector<int>&)': function body can be overwritten at link time
```
2024-12-23 12:21:30 -07:00
Jeremy Rifkin
43b0ed1b21
Add version macros header 2024-12-21 15:41:13 -06:00
Jeremy Rifkin
379a0fa594
Add a test main that disables cpptrace exception absorption 2024-11-20 23:29:29 -06:00
Jeremy Rifkin
8866d70a32
Fix bug in signal_demo and add error message on fork failure to signal tracing guide 2024-11-14 22:08:09 -06:00
Jeremy Rifkin
5c9f5150fb
Followup fixes 2024-11-11 22:41:58 -06:00
Jeremy Rifkin
addaf02387
Fix a test issue on MSVC due to TCO 2024-11-11 21:57:04 -06:00
Jeremy Rifkin
855210e624
Resolve msvc warning/error 2024-11-11 21:46:48 -06:00
Jeremy Rifkin
4cb425fb35
LTO hackery, make unittests pass under LTO, closes #179 2024-11-11 00:05:01 -06:00
Jeremy Rifkin
81d4776a22
Differentiate stacktrace_from_current_z_* from the non-z versions in another test so they aren't merged during LTO/ICF, related to #179 2024-10-10 20:03:03 -05:00
Jeremy Rifkin
0d53defcd9
Only do the inline resolution test under libdwarf, #178 2024-10-06 17:16:18 -05:00
Vittorio Romeo
0ddbbf43cb
Improve compilation times on Windows (#172)
Thank you for the very useful library!

Few improvements:
- Better header hygiene
- Isolate `windows.h` to `.cpp` whenever possible
- Use `WIN32_LEAN_AND_MEAN`
- Remove unused headers

Tested on Windows with 
```
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=1 
  -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-ftime-trace -Wall -Wextra -Wpedantic 
  -Wno-ignored-attributes" -DCMAKE_COLOR_DIAGNOSTICS=1 -DCPPTRACE_BUILD_TESTING=1 
  -DCPPTRACE_BUILD_BENCHMARKING=0
```

There's a lot more that can be improved if you are interested.

---------

Co-authored-by: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com>
2024-10-02 10:55:13 -05:00
Jeremy Rifkin
3b0eb54797
Implement a system for preventing redundant tracing during search, and other various improvements for the from_current system (#159) 2024-08-20 23:10:17 -05:00
WSUFan
88d681d986
Enable Bazel build system support (#153)
This pull request enables Bazel build support for cpptrace. Please note
that currently, only Linux is supported. Additional platform support
will be added if necessary.
2024-08-18 19:16:53 -05:00
Jeremy Rifkin
0bb5aa2318
Add a basic test for traced exception objects 2024-08-18 11:41:38 -05:00
Jeremy Rifkin
26e009c688
Add cpptrace::from_current (#155) 2024-08-18 11:11:47 -05:00
Jeremy Rifkin
d5eed55dcd
Fix -g on msvc 2024-08-18 00:56:28 -05:00
Jeremy Rifkin
df1d78d1eb
Revert "Fix -g on msvc"
This reverts commit 51551ab741.
2024-08-18 00:55:49 -05:00
Jeremy Rifkin
51551ab741
Fix -g on msvc 2024-08-18 00:53:44 -05:00
Jeremy Rifkin
70e78e3c8a
Remove some commented code 2024-08-16 10:29:00 -05:00
Degen's Regens
767ddeb10c
size_t cannot be negative (#154) 2024-08-16 10:24:40 -05:00
Jeremy Rifkin
7497bf2a6f
Unit test more thoroughly and rework matrix ci system (#147) 2024-07-12 00:59:22 -05:00
Jeremy
b93028921b
Turn on -g unconditionally 2024-07-02 13:34:15 -06:00
Jeremy
bf0551b781
Add some extra checks to unit tests 2024-06-22 19:48:04 -05:00
Jeremy Rifkin
7a9ed920d5
Add unit tests to CI (#140) 2024-06-19 20:33:32 -05:00
Jeremy
ce075b056f
Make unit testing more robust 2024-06-19 17:11:24 -05:00
Jeremy
2499fa4a67
Add option to build tests with external gtest, closes #130 2024-05-28 20:56:54 -05:00
Jeremy Rifkin
b3836e9318
Support -Wpedantic if someone sets the flag globally while using FetchContent (#127)
Closes #107
2024-05-23 21:18:11 -05:00
Jeremy
b1e3179a97
A couple quick fixes 2024-05-05 17:51:50 -05:00
Jeremy
9275f62fc5
Fix ci? 2024-05-05 15:30:24 -05:00
Jeremy
93b1d1c76a
Add basic unittest 2024-05-04 22:34:25 -05:00
Jeremy
f8ebdd26be
Small test refactor 2024-05-04 11:52:45 -05:00
Jeremy
5a1f4b6d37
Add an error message for exec failures to the signal_demo, resolves #111 2024-04-18 19:38:19 -05:00
Jeremy Rifkin
d99f1745d2
Basic source code snippet system (#98) 2024-02-28 23:29:24 -06:00