mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Kernel: Remove /proc/PID/regs
There isn't an easy way to retreive all register contents anymore, so remove this functionality. We do have the ability to trace processes, so it shouldn't really be needed anymore.
This commit is contained in:
@@ -110,7 +110,6 @@ enum ProcFileType {
|
||||
FI_PID_vm,
|
||||
FI_PID_vmobjects,
|
||||
FI_PID_stack,
|
||||
FI_PID_regs,
|
||||
FI_PID_fds,
|
||||
FI_PID_unveil,
|
||||
FI_PID_exe, // symlink
|
||||
@@ -621,32 +620,6 @@ Optional<KBuffer> procfs$pid_stack(InodeIdentifier identifier)
|
||||
return process.backtrace(*handle);
|
||||
}
|
||||
|
||||
Optional<KBuffer> procfs$pid_regs(InodeIdentifier identifier)
|
||||
{
|
||||
auto handle = ProcessInspectionHandle::from_pid(to_pid(identifier));
|
||||
if (!handle)
|
||||
return {};
|
||||
auto& process = handle->process();
|
||||
KBufferBuilder builder;
|
||||
process.for_each_thread([&](Thread& thread) {
|
||||
builder.appendf("Thread %d:\n", thread.tid());
|
||||
auto& tss = thread.tss();
|
||||
builder.appendf("eax: %x\n", tss.eax);
|
||||
builder.appendf("ebx: %x\n", tss.ebx);
|
||||
builder.appendf("ecx: %x\n", tss.ecx);
|
||||
builder.appendf("edx: %x\n", tss.edx);
|
||||
builder.appendf("esi: %x\n", tss.esi);
|
||||
builder.appendf("edi: %x\n", tss.edi);
|
||||
builder.appendf("ebp: %x\n", tss.ebp);
|
||||
builder.appendf("cr3: %x\n", tss.cr3);
|
||||
builder.appendf("flg: %x\n", tss.eflags);
|
||||
builder.appendf("sp: %w:%x\n", tss.ss, tss.esp);
|
||||
builder.appendf("pc: %w:%x\n", tss.cs, tss.eip);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
Optional<KBuffer> procfs$pid_exe(InodeIdentifier identifier)
|
||||
{
|
||||
auto handle = ProcessInspectionHandle::from_pid(to_pid(identifier));
|
||||
@@ -1610,7 +1583,6 @@ ProcFS::ProcFS()
|
||||
m_entries[FI_PID_vm] = { "vm", FI_PID_vm, false, procfs$pid_vm };
|
||||
m_entries[FI_PID_vmobjects] = { "vmobjects", FI_PID_vmobjects, true, procfs$pid_vmobjects };
|
||||
m_entries[FI_PID_stack] = { "stack", FI_PID_stack, false, procfs$pid_stack };
|
||||
m_entries[FI_PID_regs] = { "regs", FI_PID_regs, true, procfs$pid_regs };
|
||||
m_entries[FI_PID_fds] = { "fds", FI_PID_fds, false, procfs$pid_fds };
|
||||
m_entries[FI_PID_exe] = { "exe", FI_PID_exe, false, procfs$pid_exe };
|
||||
m_entries[FI_PID_cwd] = { "cwd", FI_PID_cwd, false, procfs$pid_cwd };
|
||||
|
||||
Reference in New Issue
Block a user