Commit Graph

681 Commits

Author SHA1 Message Date
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
Bruce Mitchener
aa446b0540
Fix typos. (#90) 2024-02-18 00:10:21 -06:00
ethanol20924
c3b38381ab
Small fix to allow for compiling with Homebrew installed Clang on Mac (#89)
When building with Clang installed with Homebrew:

```
-- The C compiler identification is Clang 17.0.6
-- The CXX compiler identification is Clang 17.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
```

I get the following error:

```
/opt/homebrew/opt/llvm/bin/llvm-ranlib: error: Invalid option: '-no_warning_for_no_symbols'
make[2]: *** [_deps/zstd-build/lib/libzstd.a] Error 1
make[2]: *** Deleting file `_deps/zstd-build/lib/libzstd.a'
make[1]: *** [_deps/zstd-build/lib/CMakeFiles/libzstd_static.dir/all] Error 2
make: *** [all] Error 2
```

If I instead build with AppleClang:

```
-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
```

It works as expected.

Source of the problem is found at `CMakeLists.txt:282`:

```CMake
if(APPLE)
  SET(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
  SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
```

Changing it to check specifically for AppleClang appears to fix the
problem for me:

```CMake
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
  SET(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
  SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
```
2024-02-16 11:28:38 -06:00
Jeremy
d52b80301a
Make sure to at least show object frame info even if resolution fails for libdwarf, resolves #87
Co-authored-by: eyalgolan1337
2024-02-15 19:40:11 -06:00
Leandro SQ
8d2728d0f0
fix: Broken link on README.md (#88)
This pull request includes a minor change to the `README.md` file. The
change updates the link to the `signal-safe-tracing.md` file, moving it
into the `docs` directory.
2024-02-15 12:36:28 -06:00
Jeremy
3cd8e92e66
Handle copying libcpptrace.dll better for findpackage integration 2024-02-12 22:14:03 -06:00
Jeremy
ddf155b122
Add note about -lzstd to docs 2024-02-11 22:35:41 -06:00
Jeremy
22b326ba7e
Small optimization, doesn't really matter but doesn't hurt 2024-02-11 22:22:29 -06:00
Jeremy
e6627b760d
Implement better logic for handling scrfile indices, related to #86 2024-02-11 21:02:48 -06:00
Jeremy
cb92c9fdfa
Small optimization to reduce unnecessary frame copying 2024-02-11 15:59:56 -06:00
Jeremy
36a16df075
Handle an edge case with dwarf file indices, identified in #86 2024-02-11 15:25:18 -06:00
Jeremy
7fda402638
Bump to 0.4.0 2024-02-11 12:41:21 -06:00
Jeremy
203dbb524e
Merge branch 'dev' into main 2024-02-11 12:09:13 -06:00
Jeremy
bc662438f3
Small cmake adjustments 2024-02-11 11:53:33 -06:00
Jeremy
c771c4d3f5
Update #include for ctrace docs 2024-02-11 11:44:31 -06:00
Jeremy
e166c9804d
Update standalone instructions 2024-02-11 11:43:32 -06:00
Jeremy
90802c6be1
deal with a warning under testing build that's annoyed me for a while 2024-02-11 02:11:12 -06:00
Jeremy
58d09dd010
Remove CPPTRACE_NO_EXPORT_ATTR / CPPTRACE_DEPRECATED_ATTR as they aren't used 2024-02-11 02:05:21 -06:00
Jeremy
9a7c45bda7
remove return that wasn't needed 2024-02-11 02:05:00 -06:00
Jeremy
40bc2992b2
re-add something that's useful during testing 2024-02-11 02:00:53 -06:00
Jeremy
cdaab64be2
Revert "Printbug"
This reverts commit 2e9c586ba7.
2024-02-11 01:58:29 -06:00
Jeremy
612d5e6d65
Fix architecture handling in load_mach 2024-02-11 01:53:57 -06:00
Jeremy
2e9c586ba7
Printbug 2024-02-11 01:49:46 -06:00
Jeremy
37630f479d
Try to make fat mach architecture handling more robust 2024-02-08 00:38:56 -06:00