Jeremy Rifkin
4c59e73a01
Split up cpptrace.hpp
2024-10-05 18:01:12 -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
142e0b9ea4
Per 0blu's suggestion, use the SymGetLineFromAddr macro instead of SymGetLineFromAddr64
2024-09-13 00:06:05 -05:00
Jeremy Rifkin
b364d37f78
Implement better dwarf rangelist base address logic ( #157 )
...
Related to https://github.com/davea42/libdwarf-code/issues/255 , allows
re-enabling the clang+sanitizer+rel+dsym tests.
2024-08-18 16:51:40 -05:00
Jeremy Rifkin
0e2c3a130d
Fix windows build
2024-08-18 12:11:20 -05:00
Jeremy Rifkin
164cc75681
A little refactoring and reorganization. Remove relative includes.
2024-08-18 11:58:49 -05:00
Jeremy
c35ad6887a
Fix issue with incorrect reported object addresses on macos when using debug maps
2024-07-13 19:06:13 -05:00
Jeremy
e1fb3527a4
Fix an issue with split dwarf on clang
2024-07-11 19:10:16 -05:00
Jeremy
611660de5b
Fix use after free during cleanup of split dwarf information, fixes #141
2024-07-02 21:56:35 -06:00
Jeremy
8d7a85c447
Update flatten_inlines to properly move inline frames instead of copying them and also clarify a comment
2024-06-04 23:21:14 -05:00
Infko
72b0e467d7
fix compile error in gcc 4.8.5. ( #133 )
2024-06-04 23:16:34 -05:00
Jeremy Rifkin
b2bff57d81
Debug Fission ( #132 )
...
Implement support for debug fission, closes #129
2024-05-28 20:39:34 -05:00
Jeremy
5556aedddb
Refactor cu lookup out of pc resolution
2024-05-25 16:20:41 -05:00
Jeremy
8bff5dc9fe
Quick fix
2024-05-25 14:32:34 -05:00
Jeremy
810b74ecaa
Refactor symbols_with_libdwarf indo separate files
2024-05-25 14:29:55 -05:00
Jeremy
5171e87a51
Refactor logic in the libdwarf resolver's resolve_frames, pull out trace flattening
2024-05-25 13:38:06 -05:00
Jeremy
a9f72c6f67
Refactor logic in the libdwarf resolver's resolve_frames, pull out resolver management
2024-05-25 13:02:25 -05:00
Jeremy
dcd9a31ce4
Refactor collate_frames
2024-05-25 12:38:34 -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
da0aa4d5c0
Split a bunch of internal headers into .cpp/.hpp
2024-05-05 17:44:27 -05:00
Jeremy
0527cea39f
For the libbacktrace back-end don't treat missing debug info in ELFs as a critical error; fixes #114
2024-04-28 19:51:52 -05:00
Jeremy
ffb1b8ed68
A little more error handling cleanup
2024-03-31 16:02:39 -05:00
Jeremy
124607e7bf
Resolve some TODOs with error handling for mach-o stuff
2024-03-31 15:24:01 -05:00
Jeremy
50483783cb
Fix bug with non-recursive inline walking
2024-03-30 23:18:55 -05:00
Jeremy
ab63c34827
Replace most stream use with new formatting system
2024-03-30 20:25:06 -05:00
Jeremy Rifkin
acaa4f42e6
Add a Result type and replace some exceptions with it ( #109 )
2024-03-30 13:35:52 -05:00
Jeremy
fa6155ff47
Remove awful stringf system
2024-03-29 23:12:26 -05:00
Jeremy
3e0689a5e6
Resolve object address for dbghelp frames by default, handles #100
2024-03-09 22:15:41 -06:00
Jeremy
736643358b
Implement a non-recursive get_inlines_info
2024-02-28 22:30:47 -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
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
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
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
d7aac52f8b
Add configuration to control resolution of inlined calls
2024-02-04 11:03:03 -06:00
Jeremy
b8c66cd855
Remove old comment
2024-01-29 22:29:35 -06:00
Jeremy Rifkin
79931c8823
Parsing of mach-o symbol tables, generation of debug maps, and resolution through object files ( #82 )
2024-01-29 22:12:59 -06:00
eightfold
218957dfb0
New C api ( #80 )
...
Updated C API following the requested scheme. May implement "exceptions"
later...
Closes #38
---------
Co-authored-by: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com>
2024-01-23 00:16:20 -06:00
Jeremy Rifkin
a654f2082e
Mach-o refactoring ( #77 )
...
This is the first step towards a more comprehensive mach-o system. Next
step will be to add support for symbol table parsing.
2024-01-14 23:36:30 -06:00
Jeremy
399e52f460
Try again to fix libdwarf #includes
2024-01-14 15:23:02 -06:00
Jeremy
ca76080968
Updates to better support external libdwarf, because nothing about how libdwarf's cmake is setup is consistent
2024-01-13 01:31:10 -06:00
Jeremy
e8fd01bbe1
Fallback to the cu cache or walking cu's if aranges lookup fails
2023-12-06 00:21:44 -05:00
Jeremy
9113cc5ffc
Some refactoring, bring object_frame in line with safe_object_frame. Also renamed address_relative_to_object_base_in_memory.
2023-11-20 23:13:21 -06:00
Jeremy
2a4a8066d3
Rework the object trace interface a bit and clarify their purpose. Also rename minimal_object_trace to safe_object_trace
2023-11-20 23:01:19 -06:00