Ryan Fleury
4312ee14fd
first pass at (rdi -> loose rdim) path, used in (rdi * ... * rdi) -> rdi joining in radbin; plug in regular conversion path before voff -> line & breakpad paths in radbin, such that PDBs, DWARFs, RDIs, etc. can be used as input; fix up voff -> line path to plug into regular output systems; remove String8 union thing - three reasons: (a) it was only ever introduced for convenience in Linux layers, so let's just keep zero-terminated Linux nonsense in Linux land, (b) it was just alternate syntax for a cast, so let's just cast, (c) it was misleading - 'cstr' implies null-termination, which String8 of course doesn't guarantee. this led to some misuses, where .cstr was trusted to be zero-terminated, when that was not necessarily true (semaphore opening).
2026-03-03 16:24:54 -08:00
Nikita Smith
3113db2d08
add missing retry wraps around syscalls
2026-01-26 15:34:06 -08:00
Nikita Smith
be350c4147
add cstr union field to String8 and remove char* casts from the Linux code
2026-01-22 14:04:40 -08:00
Nikita Smith
e724ee8185
use /proc/pid/exe to extract ELF header
2026-01-22 13:59:12 -08:00
Nikita Smith
e907d895c6
refactored Linux layer to use static types for the entities
2026-01-22 13:30:39 -08:00
Nikita Smith
70d04ac807
clean up unused process fields
2026-01-12 16:48:31 -08:00
Nikita Smith
12b53f4174
move register layout struct to Linux OS layer; use only GPR portion of
...
the layout struct for reg r/w; handle orig_rax
2026-01-12 16:48:31 -08:00
Nikita Smith
fd6c3ef0e0
move GNU and ELF specific struct readers to appropriate layers
2025-12-28 01:16:55 -08:00
Nikita Smith
f150662cc4
update logic for tracking new threads
2025-12-20 14:41:01 -08:00
Nikita Smith
cc01c04b8a
use p_vaddr for computing dynamic segment address
2025-12-18 20:05:47 -08:00
Nikita Smith
952afd49a7
generalize machine ops
2025-12-16 10:40:48 -08:00
Nikita Smith
5b6ffd5a49
clean up instrumentation inherited during fork
2025-12-09 16:08:19 -08:00
Nikita Smith
962f0e30ae
WIP fork
2025-12-09 09:56:43 -08:00
Nikita Smith
c221286ab8
WIP process attaching
2025-12-08 13:29:24 -08:00
Nikita Smith
8005c31276
remove x86 register code
2025-12-05 16:39:02 -08:00
Nikita Smith
ce77442d37
fix x87 register layout
2025-12-05 16:36:46 -08:00
Nikita Smith
f4ceaecf75
set flags in xstate_bv for updated registers
2025-12-05 13:35:10 -08:00
Nikita Smith
f8f3f95d33
set trace options in PTRACE_SEIZE and remove unnecessary PTRACE_SETOPTIONS
2025-11-27 15:45:36 -08:00
Nikita Smith
7f701dd806
minor fix
2025-11-26 20:31:34 -08:00
Nikita Smith
a1884aaf5f
WIP handle abnormal process initialization
2025-11-25 16:24:57 -08:00
Nikita Smith
0565fdef0a
WIP add support for GNU LibC TLS model
...
Unlike on Windows, TLS index isn't part of the module format. glibc stores
it in the opaque link_map struct. There are many different heuristics
a debugger can use to locate it but most of them are unreliable and
prone to errors, or don't work when debugger attaches to a process.
We adopt the newer approach of looking for special symbols
in glibc that provide TLS index offset. These symbols were added in
2021, so programs linked with older glibc won't have TLS support.
2025-11-21 16:41:35 -08:00
Nikita Smith
533e7431e7
WIP switch to special mutex for syncing halts
2025-11-19 13:01:25 -08:00
Nikita Smith
b7fb4fe04d
WIP improved signal handling in multi-threaded programs
2025-11-19 11:38:22 -08:00
Nikita Smith and Ryan Fleury
1196de6916
move sys/wait.h to os_core_linux
2025-11-07 16:37:45 -08:00
Ryan Fleury
035e72306d
o_cloexec; preserve leading slashes in root-level paths
2025-11-07 16:37:30 -08:00
Nikita Smith and Ryan Fleury
ddc57a0ac4
WIP changed backend to use ptrace seize and interrupt
2025-11-07 15:47:15 -08:00
Nikita Smith and Ryan Fleury
857860fb27
remove unused includes and inline ptrace options define
2025-11-07 14:39:46 -08:00
Nikita Smith and Ryan Fleury
66606b0327
use STAP probes to generate load and unload module events
2025-11-07 14:39:46 -08:00
Nikita Smith and Ryan Fleury
c4c9ef5182
WIP: got Linux to the point where single stepping and breakpoint
...
events are being reported correctly to the debugger
2025-11-07 14:39:46 -08:00
Nikita Smith and Ryan Fleury
78f2e641bc
fix program header rebase issue in non-PIE exes, and export program header
...
info through DEMON event
2025-11-07 14:39:45 -08:00
Ryan Fleury
c738768e41
demon/win32: do not assume actual_read is valid after a failed process memory read
2025-10-09 16:05:13 -07:00
Ryan Fleury
284524e0c4
fix incorrect ctx check in win32 demon
2025-10-06 14:35:41 -07:00
Ryan Fleury
45a2137d08
linux: fix incorrect gethostname usage, fix build, fix clang warnings
2025-09-30 10:02:40 -07:00
Ryan Fleury
0d15b8670b
eliminate bifurcated rw lock path based on exclusive mode; promote thread operations to base layer, use os layer as impl; first pass on moving file streaming layer to base layer's async wavefront
2025-09-17 14:47:55 -07:00
Mārtiņš Možeiko and Ryan Fleury
d8bb8c76c6
add shadow stack register and read it in win32 thread context
2025-09-03 09:36:20 -07:00
Ryan Fleury
cdec8d5980
ctrl/demon: fastfail exception codes / notes; p2r2: finish symbol conversion etc. in new wavefront-style version
2025-08-19 16:47:12 -07:00
Ryan Fleury
c33dd2869a
define synchronization primitive interface in base layer, implement using os layer; convert all usage -> base layer; use base sync primitives in lane tctx info
2025-08-18 10:46:43 -07:00
Ryan Fleury
cd8c3a2172
enable read/write bits on just read data breakpoint on x64 - there is no way to do a read-only (without write) data breakpoint
2025-08-06 11:50:01 -07:00
Ryan Fleury
9c2bdf492f
ptrace register reading debugging
2025-08-04 12:36:04 -07:00
Ryan Fleury
25963dc9b4
demon/linux: correct main module address range formation; further progress on event processing
2025-07-31 17:33:58 -07:00
Ryan Fleury
a323aec6d0
demon/linux: x64 trap writing
2025-07-31 15:10:25 -07:00
Ryan Fleury
7c99e79981
demon/linux: first pass port at x64 register writing
2025-07-31 14:54:28 -07:00
Ryan Fleury
1a19bf9663
render/d3d11: adjust allowed frame 'latency' (frames-in-queue) based on number of active windows, to not unnecessarily block if we have two windows to build frames for; demon/linux: sketch out register writing path, ensure reg read/write paths have slots for other architectures
2025-07-31 14:09:42 -07:00
Ryan Fleury
9ef87e9d56
fix to match 32 -> 64 change in demon/win32
2025-07-29 14:22:23 -07:00
Ryan Fleury
7403a8ea3b
demon/linux: x64 register reading
2025-07-29 14:19:54 -07:00
Ryan Fleury
0e9f2ee03c
demon/linux: halting, sigstop cases
2025-07-28 17:47:50 -07:00
Ryan Fleury
64c2d98ede
demon/linux: sketch out signal interpretation, more ptrace study
2025-07-28 17:25:24 -07:00
Ryan Fleury
4d7088d321
do not pre-emptively exit the debug event loop on timeout unless we actually have debug strings
2025-07-25 14:21:31 -07:00
Ryan Fleury
fcf3e73f5f
demon/linux: thread resuming in dmn_ctrl_run
2025-07-17 18:51:40 -07:00
Ryan Fleury
6fb406d6c5
demon/linux: launch event info coverage, module path strings, pipe deferred debug info events first on dmn_ctrl_run
2025-07-17 18:05:00 -07:00