Skip to content

Commit

Permalink
Applications: Remove i686 support
Browse files Browse the repository at this point in the history
  • Loading branch information
supercomputer7 authored and awesomekling committed Dec 28, 2022
1 parent c191daa commit e11dcd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Userland/Applications/Browser/BrowserWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void BrowserWindow::build_menus()
m_user_agent_spoof_actions.add_action(action);
};
add_user_agent("Chrome Linux Desktop", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36");
add_user_agent("Firefox Linux Desktop", "Mozilla/5.0 (X11; Linux i686; rv:87.0) Gecko/20100101 Firefox/87.0");
add_user_agent("Firefox Linux Desktop", "Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0");
add_user_agent("Safari macOS Desktop", "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15");
add_user_agent("Chrome Android Mobile", "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.66 Mobile Safari/537.36");
add_user_agent("Firefox Android Mobile", "Mozilla/5.0 (Android 11; Mobile; rv:68.0) Gecko/68.0 Firefox/86.0");
Expand Down
6 changes: 1 addition & 5 deletions Userland/Applications/CrashReporter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,7 @@ static TitleAndText build_cpu_registers(const ELF::Core::ThreadInfo& thread_info

StringBuilder builder;

#if ARCH(I386)
builder.appendff("eax={:p} ebx={:p} ecx={:p} edx={:p}\n", regs.eax, regs.ebx, regs.ecx, regs.edx);
builder.appendff("ebp={:p} esp={:p} esi={:p} edi={:p}\n", regs.ebp, regs.esp, regs.esi, regs.edi);
builder.appendff("eip={:p} eflags={:p}", regs.eip, regs.eflags);
#elif ARCH(X86_64)
#if ARCH(X86_64)
builder.appendff("rax={:p} rbx={:p} rcx={:p} rdx={:p}\n", regs.rax, regs.rbx, regs.rcx, regs.rdx);
builder.appendff("rbp={:p} rsp={:p} rsi={:p} rdi={:p}\n", regs.rbp, regs.rsp, regs.rsi, regs.rdi);
builder.appendff(" r8={:p} r9={:p} r10={:p} r11={:p}\n", regs.r8, regs.r9, regs.r10, regs.r11);
Expand Down
30 changes: 2 additions & 28 deletions Userland/Applications/Debugger/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ static void handle_sigint(int)

static void handle_print_registers(PtraceRegisters const& regs)
{
#if ARCH(I386)
outln("eax={:p} ebx={:p} ecx={:p} edx={:p}", regs.eax, regs.ebx, regs.ecx, regs.edx);
outln("esp={:p} ebp={:p} esi={:p} edi={:p}", regs.esp, regs.ebp, regs.esi, regs.edi);
outln("eip={:p} eflags={:p}", regs.eip, regs.eflags);
#elif ARCH(X86_64)
#if ARCH(X86_64)
outln("rax={:p} rbx={:p} rcx={:p} rdx={:p}", regs.rax, regs.rbx, regs.rcx, regs.rdx);
outln("rsp={:p} rbp={:p} rsi={:p} rdi={:p}", regs.rsp, regs.rbp, regs.rsi, regs.rdi);
outln("r8 ={:p} r9 ={:p} r10={:p} r11={:p}", regs.r8, regs.r9, regs.r10, regs.r11);
Expand Down Expand Up @@ -97,28 +93,8 @@ static bool handle_disassemble_command(DeprecatedString const& command, FlatPtr

static bool handle_backtrace_command(PtraceRegisters const& regs)
{
#if ARCH(I386)
auto ebp_val = regs.ebp;
auto eip_val = regs.eip;
outln("Backtrace:");
while (g_debug_session->peek(eip_val).has_value() && g_debug_session->peek(ebp_val).has_value()) {
auto eip_symbol = g_debug_session->symbolicate(eip_val);
auto source_position = g_debug_session->get_source_position(eip_val);
DeprecatedString symbol_location = (eip_symbol.has_value() && eip_symbol->symbol != "") ? eip_symbol->symbol : "???";
if (source_position.has_value()) {
outln("{:p} in {} ({}:{})", eip_val, symbol_location, source_position->file_path, source_position->line_number);
} else {
outln("{:p} in {}", eip_val, symbol_location);
}
auto next_eip = g_debug_session->peek(ebp_val + 4);
auto next_ebp = g_debug_session->peek(ebp_val);
eip_val = (u32)next_eip.value();
ebp_val = (u32)next_ebp.value();
}
#else
(void)regs;
TODO();
#endif
return true;
}

Expand Down Expand Up @@ -249,9 +225,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)

VERIFY(optional_regs.has_value());
const PtraceRegisters& regs = optional_regs.value();
#if ARCH(I386)
const FlatPtr ip = regs.eip;
#elif ARCH(X86_64)
#if ARCH(X86_64)
const FlatPtr ip = regs.rip;
#elif ARCH(AARCH64)
const FlatPtr ip = 0; // FIXME
Expand Down

0 comments on commit e11dcd2

Please sign in to comment.