Commit Graph

518 Commits

Author SHA1 Message Date
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
Jeremy
59272bccd6
printbug... 2024-02-07 22:37:55 -06:00
Jeremy
41f37a3446
Run on the new macos 14 runners with a newer default xcode to try to workaround a linker internal error 2024-02-07 22:24:48 -06:00
Jeremy
df6e02087e
Update for vcpkg 2024-02-07 22:08:45 -06:00
Jeremy
60dd6b5065
Fix issues related to export directives 2024-02-07 21:40:52 -06:00
Jeremy
adefa5c234
Bump libdwarf hashes and use the lightweight mirror 2024-02-07 21:34:41 -06:00
Jeremy
683c046f87
Forgot to commit readme update 2024-02-07 21:26:03 -06:00
Jeremy
68f919f292
Add ctrace documentation 2024-02-07 00:11:48 -06:00
Jeremy
78dd053f21
Light ctrace refactoring 2024-02-06 23:10:02 -06:00
Jeremy
ead847ad70
Fix main invocation 2024-02-06 09:08:22 -06:00
Jeremy
8b8bd1b5df
Test findpackage for msvc too 2024-02-06 00:00:45 -06:00
Jeremy
f972c43420
Copy the dll 2024-02-05 23:51:02 -06:00
Jeremy
6525b125ef
Two small fixes 2024-02-05 23:40:08 -06:00
Jeremy
74ed63f3ff
Fix some funny business 2024-02-05 23:37:33 -06:00