mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 20:04:59 +00:00
Userland: Remove i686 support
This commit is contained in:
parent
55f17fff36
commit
445b5e1e94
5 changed files with 6 additions and 60 deletions
|
@ -18,9 +18,7 @@
|
||||||
|
|
||||||
namespace Web {
|
namespace Web {
|
||||||
|
|
||||||
#if ARCH(I386)
|
#if ARCH(X86_64)
|
||||||
# define CPU_STRING "x86"
|
|
||||||
#elif ARCH(X86_64)
|
|
||||||
# define CPU_STRING "x86_64"
|
# define CPU_STRING "x86_64"
|
||||||
#elif ARCH(AARCH64)
|
#elif ARCH(AARCH64)
|
||||||
# define CPU_STRING "AArch64"
|
# define CPU_STRING "AArch64"
|
||||||
|
|
|
@ -50,15 +50,7 @@ static void print_syscall(PtraceRegisters& regs, size_t depth)
|
||||||
}
|
}
|
||||||
StringView begin_color = g_should_output_color ? "\033[34;1m"sv : ""sv;
|
StringView begin_color = g_should_output_color ? "\033[34;1m"sv : ""sv;
|
||||||
StringView end_color = g_should_output_color ? "\033[0m"sv : ""sv;
|
StringView end_color = g_should_output_color ? "\033[0m"sv : ""sv;
|
||||||
#if ARCH(I386)
|
#if ARCH(X86_64)
|
||||||
outln("=> {}SC_{}({:#x}, {:#x}, {:#x}){}",
|
|
||||||
begin_color,
|
|
||||||
Syscall::to_string((Syscall::Function)regs.eax),
|
|
||||||
regs.edx,
|
|
||||||
regs.ecx,
|
|
||||||
regs.ebx,
|
|
||||||
end_color);
|
|
||||||
#elif ARCH(X86_64)
|
|
||||||
outln("=> {}SC_{}({:#x}, {:#x}, {:#x}){}",
|
outln("=> {}SC_{}({:#x}, {:#x}, {:#x}){}",
|
||||||
begin_color,
|
begin_color,
|
||||||
Syscall::to_string((Syscall::Function)regs.rax),
|
Syscall::to_string((Syscall::Function)regs.rax),
|
||||||
|
@ -146,9 +138,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
return Debug::DebugSession::DebugDecision::ContinueBreakAtSyscall;
|
return Debug::DebugSession::DebugDecision::ContinueBreakAtSyscall;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ARCH(I386)
|
#if ARCH(X86_64)
|
||||||
const FlatPtr ip = regs.value().eip;
|
|
||||||
#elif ARCH(X86_64)
|
|
||||||
const FlatPtr ip = regs.value().rip;
|
const FlatPtr ip = regs.value().rip;
|
||||||
#elif ARCH(AARCH64)
|
#elif ARCH(AARCH64)
|
||||||
const FlatPtr ip = 0; // FIXME
|
const FlatPtr ip = 0; // FIXME
|
||||||
|
|
|
@ -30,11 +30,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
outln("{}:", pid);
|
outln("{}:", pid);
|
||||||
|
|
||||||
#if ARCH(I386)
|
|
||||||
auto padding = "";
|
|
||||||
#else
|
|
||||||
auto padding = " ";
|
auto padding = " ";
|
||||||
#endif
|
|
||||||
|
|
||||||
if (extended) {
|
if (extended) {
|
||||||
outln("Address{} Size Resident Dirty Access VMObject Type Purgeable CoW Pages Name", padding);
|
outln("Address{} Size Resident Dirty Access VMObject Type Purgeable CoW Pages Name", padding);
|
||||||
|
|
|
@ -187,30 +187,7 @@ static char const* object_symbol_binding_to_string(ElfW(Word) type)
|
||||||
static char const* object_relocation_type_to_string(ElfW(Word) type)
|
static char const* object_relocation_type_to_string(ElfW(Word) type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
#if ARCH(I386)
|
#if ARCH(x86_64)
|
||||||
case R_386_NONE:
|
|
||||||
return "R_386_NONE";
|
|
||||||
case R_386_32:
|
|
||||||
return "R_386_32";
|
|
||||||
case R_386_PC32:
|
|
||||||
return "R_386_PC32";
|
|
||||||
case R_386_GOT32:
|
|
||||||
return "R_386_GOT32";
|
|
||||||
case R_386_PLT32:
|
|
||||||
return "R_386_PLT32";
|
|
||||||
case R_386_COPY:
|
|
||||||
return "R_386_COPY";
|
|
||||||
case R_386_GLOB_DAT:
|
|
||||||
return "R_386_GLOB_DAT";
|
|
||||||
case R_386_JMP_SLOT:
|
|
||||||
return "R_386_JMP_SLOT";
|
|
||||||
case R_386_RELATIVE:
|
|
||||||
return "R_386_RELATIVE";
|
|
||||||
case R_386_TLS_TPOFF:
|
|
||||||
return "R_386_TLS_TPOFF";
|
|
||||||
case R_386_TLS_TPOFF32:
|
|
||||||
return "R_386_TLS_TPOFF32";
|
|
||||||
#else
|
|
||||||
case R_X86_64_NONE:
|
case R_X86_64_NONE:
|
||||||
return "R_X86_64_NONE";
|
return "R_X86_64_NONE";
|
||||||
case R_X86_64_64:
|
case R_X86_64_64:
|
||||||
|
@ -386,11 +363,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
outln();
|
outln();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ARCH(I386)
|
|
||||||
auto addr_padding = "";
|
|
||||||
#else
|
|
||||||
auto addr_padding = " ";
|
auto addr_padding = " ";
|
||||||
#endif
|
|
||||||
|
|
||||||
if (display_section_headers) {
|
if (display_section_headers) {
|
||||||
if (!display_all) {
|
if (!display_all) {
|
||||||
|
|
|
@ -210,11 +210,7 @@ END_VALUES_TO_NAMES()
|
||||||
|
|
||||||
static int g_pid = -1;
|
static int g_pid = -1;
|
||||||
|
|
||||||
#if ARCH(I386)
|
|
||||||
using syscall_arg_t = u32;
|
|
||||||
#elif ARCH(X86_64) || ARCH(AARCH64)
|
|
||||||
using syscall_arg_t = u64;
|
using syscall_arg_t = u64;
|
||||||
#endif
|
|
||||||
|
|
||||||
static void handle_sigint(int)
|
static void handle_sigint(int)
|
||||||
{
|
{
|
||||||
|
@ -887,12 +883,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
}
|
}
|
||||||
PtraceRegisters regs = {};
|
PtraceRegisters regs = {};
|
||||||
TRY(Core::System::ptrace(PT_GETREGS, g_pid, ®s, 0));
|
TRY(Core::System::ptrace(PT_GETREGS, g_pid, ®s, 0));
|
||||||
#if ARCH(I386)
|
#if ARCH(X86_64)
|
||||||
syscall_arg_t syscall_index = regs.eax;
|
|
||||||
syscall_arg_t arg1 = regs.edx;
|
|
||||||
syscall_arg_t arg2 = regs.ecx;
|
|
||||||
syscall_arg_t arg3 = regs.ebx;
|
|
||||||
#elif ARCH(X86_64)
|
|
||||||
syscall_arg_t syscall_index = regs.rax;
|
syscall_arg_t syscall_index = regs.rax;
|
||||||
syscall_arg_t arg1 = regs.rdx;
|
syscall_arg_t arg1 = regs.rdx;
|
||||||
syscall_arg_t arg2 = regs.rcx;
|
syscall_arg_t arg2 = regs.rcx;
|
||||||
|
@ -915,9 +906,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
TRY(Core::System::ptrace(PT_GETREGS, g_pid, ®s, 0));
|
TRY(Core::System::ptrace(PT_GETREGS, g_pid, ®s, 0));
|
||||||
|
|
||||||
#if ARCH(I386)
|
#if ARCH(X86_64)
|
||||||
u32 res = regs.eax;
|
|
||||||
#elif ARCH(X86_64)
|
|
||||||
u64 res = regs.rax;
|
u64 res = regs.rax;
|
||||||
#elif ARCH(AARCH64)
|
#elif ARCH(AARCH64)
|
||||||
u64 res = 0; // FIXME
|
u64 res = 0; // FIXME
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue