Commit Graph

25 Commits

Author SHA1 Message Date
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
164cc75681
A little refactoring and reorganization. Remove relative includes. 2024-08-18 11:58:49 -05:00
Jeremy
da0aa4d5c0
Split a bunch of internal headers into .cpp/.hpp 2024-05-05 17:44:27 -05:00
Jeremy
abbc77dcea
Clean up logic a bit 2024-05-02 11:17:41 -05:00
Jeremy
d3c7e7351c
Remove guard for resolve_l_name 2024-05-02 11:09:37 -05:00
Jeremy
ce19421bb5
Update for macos 2024-05-02 11:05:22 -05:00
Jeremy
b125248b32
Update dladdr path to not use dli_fname as it's unreliable in the case of a non-standard argv[0] 2024-05-02 10:47:31 -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
a528aa8e0b
Fix object address resolution with _dl_find_object, #104 2024-03-16 16:17:27 -05:00
Jeremy
c896d70f79
Small reorganization 2024-03-05 17:47:55 -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
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
cdaab64be2
Revert "Printbug"
This reverts commit 2e9c586ba7.
2024-02-11 01:58:29 -06:00
Jeremy
2e9c586ba7
Printbug 2024-02-11 01:49:46 -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
3a0db500d0
Fixes 2023-11-21 21:32:42 -06:00
Jeremy
64a60f227d
Resolve a couple compilation warnings 2023-11-21 12:11:16 -06:00
Jeremy
e889fa7acf
Use dlfo_link_map->l_addr over dlfo_map_start 2023-11-21 09:41:56 -06:00
Jeremy
87cd24438b
Use _dl_find_object over dladdr when possible in object resolution, it's so much faster 2023-11-20 23:36:55 -06: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
Jeremy
ac7db48cef
Really fix it this time 2023-11-19 23:07:41 -06:00
Jeremy
f4237c75df
Try to fix build 2023-11-19 22:54:08 -06:00
Jeremy
ac13e71877
Implement signal-safe resolution of basic object information 2023-11-19 22:49:58 -06:00
Jeremy
0e462c7b03
Some restructuring of the directory layout 2023-11-18 23:28:48 -06:00