summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-10-02 22:14:37 +0100
committerAndreas Kling <kling@serenityos.org>2020-10-03 12:36:49 +0200
commitbcfc6f0c57f9d4ce4343cbb6ee0f0ab8de56c789 (patch)
treed3e16e6361f4693ae5362c10da05bc6a4ad30190 /Libraries
parent4e86c34ef0d1d227309f8e8d22be5ea737830c24 (diff)
downloadserenity-bcfc6f0c57f9d4ce4343cbb6ee0f0ab8de56c789.zip
Everywhere: Fix more typos
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibChess/Chess.cpp4
-rw-r--r--Libraries/LibChess/Chess.h4
-rw-r--r--Libraries/LibDebug/DebugSession.cpp34
-rw-r--r--Libraries/LibDebug/DebugSession.h16
-rw-r--r--Libraries/LibELF/exec_elf.h2
5 files changed, 30 insertions, 30 deletions
diff --git a/Libraries/LibChess/Chess.cpp b/Libraries/LibChess/Chess.cpp
index 6e332e3cc4..f452156b8f 100644
--- a/Libraries/LibChess/Chess.cpp
+++ b/Libraries/LibChess/Chess.cpp
@@ -536,9 +536,9 @@ Board::Result Board::game_result() const
auto repeats = m_previous_states.get(*this);
if (repeats.has_value()) {
if (repeats.value() == 3)
- return Result::ThreeFoldRepitition;
+ return Result::ThreeFoldRepetition;
if (repeats.value() >= 5)
- return Result::FiveFoldRepitition;
+ return Result::FiveFoldRepetition;
}
return Result::NotFinished;
diff --git a/Libraries/LibChess/Chess.h b/Libraries/LibChess/Chess.h
index 0a49f49165..3a8b0f0e8d 100644
--- a/Libraries/LibChess/Chess.h
+++ b/Libraries/LibChess/Chess.h
@@ -137,8 +137,8 @@ public:
StaleMate,
FiftyMoveRule,
SeventyFiveMoveRule,
- ThreeFoldRepitition,
- FiveFoldRepitition,
+ ThreeFoldRepetition,
+ FiveFoldRepetition,
InsufficientMaterial,
NotFinished,
};
diff --git a/Libraries/LibDebug/DebugSession.cpp b/Libraries/LibDebug/DebugSession.cpp
index 9ba0a5b355..f6e82e140c 100644
--- a/Libraries/LibDebug/DebugSession.cpp
+++ b/Libraries/LibDebug/DebugSession.cpp
@@ -31,7 +31,7 @@
namespace Debug {
DebugSession::DebugSession(int pid)
- : m_debugee_pid(pid)
+ : m_debuggee_pid(pid)
, m_executable(initialize_executable_mapped_file(pid))
, m_elf(ELF::Loader::create(reinterpret_cast<const u8*>(m_executable->data()), m_executable->size()))
, m_debug_info(m_elf)
@@ -47,7 +47,7 @@ NonnullOwnPtr<const MappedFile> DebugSession::initialize_executable_mapped_file(
DebugSession::~DebugSession()
{
- if (m_is_debugee_dead)
+ if (m_is_debuggee_dead)
return;
for (const auto& bp : m_breakpoints) {
@@ -55,7 +55,7 @@ DebugSession::~DebugSession()
}
m_breakpoints.clear();
- if (ptrace(PT_DETACH, m_debugee_pid, 0, 0) < 0) {
+ if (ptrace(PT_DETACH, m_debuggee_pid, 0, 0) < 0) {
perror("PT_DETACH");
}
}
@@ -118,7 +118,7 @@ OwnPtr<DebugSession> DebugSession::exec_and_attach(const String& command)
bool DebugSession::poke(u32* address, u32 data)
{
- if (ptrace(PT_POKE, m_debugee_pid, (void*)address, data) < 0) {
+ if (ptrace(PT_POKE, m_debuggee_pid, (void*)address, data) < 0) {
perror("PT_POKE");
return false;
}
@@ -128,7 +128,7 @@ bool DebugSession::poke(u32* address, u32 data)
Optional<u32> DebugSession::peek(u32* address) const
{
Optional<u32> result;
- int rc = ptrace(PT_PEEK, m_debugee_pid, (void*)address, 0);
+ int rc = ptrace(PT_PEEK, m_debuggee_pid, (void*)address, 0);
if (errno == 0)
result = static_cast<u32>(rc);
return result;
@@ -205,7 +205,7 @@ bool DebugSession::breakpoint_exists(void* address) const
PtraceRegisters DebugSession::get_registers() const
{
PtraceRegisters regs;
- if (ptrace(PT_GETREGS, m_debugee_pid, &regs, 0) < 0) {
+ if (ptrace(PT_GETREGS, m_debuggee_pid, &regs, 0) < 0) {
perror("PT_GETREGS");
ASSERT_NOT_REACHED();
}
@@ -214,26 +214,26 @@ PtraceRegisters DebugSession::get_registers() const
void DebugSession::set_registers(const PtraceRegisters& regs)
{
- if (ptrace(PT_SETREGS, m_debugee_pid, reinterpret_cast<void*>(&const_cast<PtraceRegisters&>(regs)), 0) < 0) {
+ if (ptrace(PT_SETREGS, m_debuggee_pid, reinterpret_cast<void*>(&const_cast<PtraceRegisters&>(regs)), 0) < 0) {
perror("PT_SETREGS");
ASSERT_NOT_REACHED();
}
}
-void DebugSession::continue_debugee(ContinueType type)
+void DebugSession::continue_debuggee(ContinueType type)
{
int command = (type == ContinueType::FreeRun) ? PT_CONTINUE : PT_SYSCALL;
- if (ptrace(command, m_debugee_pid, 0, 0) < 0) {
+ if (ptrace(command, m_debuggee_pid, 0, 0) < 0) {
perror("continue");
ASSERT_NOT_REACHED();
}
}
-int DebugSession::continue_debugee_and_wait(ContinueType type)
+int DebugSession::continue_debuggee_and_wait(ContinueType type)
{
- continue_debugee(type);
+ continue_debuggee(type);
int wstatus = 0;
- if (waitpid(m_debugee_pid, &wstatus, WSTOPPED | WEXITED) != m_debugee_pid) {
+ if (waitpid(m_debuggee_pid, &wstatus, WSTOPPED | WEXITED) != m_debuggee_pid) {
perror("waitpid");
ASSERT_NOT_REACHED();
}
@@ -245,17 +245,17 @@ void* DebugSession::single_step()
// Single stepping works by setting the x86 TRAP flag bit in the eflags register.
// This flag causes the cpu to enter single-stepping mode, which causes
// Interrupt 1 (debug interrupt) to be emitted after every instruction.
- // To single step the program, we set the TRAP flag and continue the debugee.
- // After the debugee has stopped, we clear the TRAP flag.
+ // To single step the program, we set the TRAP flag and continue the debuggee.
+ // After the debuggee has stopped, we clear the TRAP flag.
auto regs = get_registers();
constexpr u32 TRAP_FLAG = 0x100;
regs.eflags |= TRAP_FLAG;
set_registers(regs);
- continue_debugee();
+ continue_debuggee();
- if (waitpid(m_debugee_pid, 0, WSTOPPED) != m_debugee_pid) {
+ if (waitpid(m_debuggee_pid, 0, WSTOPPED) != m_debuggee_pid) {
perror("waitpid");
ASSERT_NOT_REACHED();
}
@@ -271,7 +271,7 @@ void DebugSession::detach()
for (auto& breakpoint : m_breakpoints.keys()) {
remove_breakpoint(breakpoint);
}
- continue_debugee();
+ continue_debuggee();
}
}
diff --git a/Libraries/LibDebug/DebugSession.h b/Libraries/LibDebug/DebugSession.h
index 43eff008e8..fc79c9b329 100644
--- a/Libraries/LibDebug/DebugSession.h
+++ b/Libraries/LibDebug/DebugSession.h
@@ -52,7 +52,7 @@ public:
DebugSession(int pid);
~DebugSession();
- int pid() const { return m_debugee_pid; }
+ int pid() const { return m_debuggee_pid; }
bool poke(u32* address, u32 data);
Optional<u32> peek(u32* address) const;
@@ -88,10 +88,10 @@ public:
FreeRun,
Syscall,
};
- void continue_debugee(ContinueType type = ContinueType::FreeRun);
+ void continue_debuggee(ContinueType type = ContinueType::FreeRun);
// Returns the wstatus result of waitpid()
- int continue_debugee_and_wait(ContinueType type = ContinueType::FreeRun);
+ int continue_debuggee_and_wait(ContinueType type = ContinueType::FreeRun);
// Returns the new eip
void* single_step();
@@ -126,8 +126,8 @@ private:
static NonnullOwnPtr<const MappedFile> initialize_executable_mapped_file(int pid);
- int m_debugee_pid { -1 };
- bool m_is_debugee_dead { false };
+ int m_debuggee_pid { -1 };
+ bool m_is_debuggee_dead { false };
NonnullOwnPtr<const MappedFile> m_executable;
NonnullRefPtr<const ELF::Loader> m_elf;
@@ -150,13 +150,13 @@ void DebugSession::run(Callback callback)
State state { State::FreeRun };
auto do_continue_and_wait = [&]() {
- int wstatus = continue_debugee_and_wait((state == State::FreeRun) ? ContinueType::FreeRun : ContinueType::Syscall);
+ int wstatus = continue_debuggee_and_wait((state == State::FreeRun) ? ContinueType::FreeRun : ContinueType::Syscall);
- // FIXME: This check actually only checks whether the debugee
+ // FIXME: This check actually only checks whether the debuggee
// stopped because it hit a breakpoint/syscall/is in single stepping mode or not
if (WSTOPSIG(wstatus) != SIGTRAP) {
callback(DebugBreakReason::Exited, Optional<PtraceRegisters>());
- m_is_debugee_dead = true;
+ m_is_debuggee_dead = true;
return true;
}
return false;
diff --git a/Libraries/LibELF/exec_elf.h b/Libraries/LibELF/exec_elf.h
index ea7be85e40..03871e6e26 100644
--- a/Libraries/LibELF/exec_elf.h
+++ b/Libraries/LibELF/exec_elf.h
@@ -618,7 +618,7 @@ typedef struct {
* NT_OPENBSD_PROCINFO
* Note is a "elfcore_procinfo" structure.
* NT_OPENBSD_AUXV
- * Note is a a bunch of Auxilliary Vectors, terminated by
+ * Note is a a bunch of Auxiliary Vectors, terminated by
* an AT_NULL entry.
* NT_OPENBSD_REGS
* Note is a "reg" structure.