mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 14:20:21 +00:00
Kernel+Userland: Add x86_64 registers to RegisterState/PtraceRegisters
This commit is contained in:
parent
10ca7f18a7
commit
233ef26e4d
Notes:
sideshowbarker
2024-07-18 11:27:31 +09:00
Author: https://github.com/gunnarbeutner
Commit: 233ef26e4d
Pull-request: https://github.com/SerenityOS/serenity/pull/8269
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/IdanHo
13 changed files with 265 additions and 23 deletions
|
@ -61,9 +61,15 @@ public:
|
|||
if (current_thread.is_profiling_suppressed())
|
||||
return;
|
||||
if (auto* event_buffer = current_thread.process().current_perf_events_buffer()) {
|
||||
#if ARCH(I386)
|
||||
[[maybe_unused]] auto rc = event_buffer->append_with_eip_and_ebp(
|
||||
current_thread.pid(), current_thread.tid(),
|
||||
regs.eip, regs.ebp, PERF_EVENT_SAMPLE, lost_time, 0, 0, nullptr);
|
||||
#else
|
||||
[[maybe_unused]] auto rc = event_buffer->append_with_eip_and_ebp(
|
||||
current_thread.pid(), current_thread.tid(),
|
||||
regs.rip, regs.rbp, PERF_EVENT_SAMPLE, lost_time, 0, 0, nullptr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,9 +119,15 @@ public:
|
|||
if (thread.is_profiling_suppressed())
|
||||
return;
|
||||
if (auto* event_buffer = thread.process().current_perf_events_buffer()) {
|
||||
#if ARCH(I386)
|
||||
[[maybe_unused]] auto rc = event_buffer->append_with_eip_and_ebp(
|
||||
thread.pid(), thread.tid(),
|
||||
regs.eip, regs.ebp, PERF_EVENT_PAGE_FAULT, 0, 0, 0, nullptr);
|
||||
#else
|
||||
[[maybe_unused]] auto rc = event_buffer->append_with_eip_and_ebp(
|
||||
thread.pid(), thread.tid(),
|
||||
regs.rip, regs.rbp, PERF_EVENT_PAGE_FAULT, 0, 0, 0, nullptr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue