1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +00:00

Everywhere: Rename {Deprecated => Byte}String

This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
Ali Mohammad Pur 2023-12-16 17:49:34 +03:30 committed by Ali Mohammad Pur
parent 38d62563b3
commit 5e1499d104
1615 changed files with 10257 additions and 10257 deletions

View file

@ -6,8 +6,8 @@
#pragma once
#include <AK/ByteString.h>
#include <AK/Demangle.h>
#include <AK/DeprecatedString.h>
#include <AK/Function.h>
#include <AK/HashMap.h>
#include <AK/NonnullRefPtr.h>
@ -27,8 +27,8 @@ namespace Debug {
class DebugSession : public ProcessInspector {
public:
static OwnPtr<DebugSession> exec_and_attach(DeprecatedString const& command, DeprecatedString source_root = {}, Function<ErrorOr<void>()> setup_child = {}, Function<void(float)> on_initialization_progress = {});
static OwnPtr<DebugSession> attach(pid_t pid, DeprecatedString source_root = {}, Function<void(float)> on_initialization_progress = {});
static OwnPtr<DebugSession> exec_and_attach(ByteString const& command, ByteString source_root = {}, Function<ErrorOr<void>()> setup_child = {}, Function<void(float)> on_initialization_progress = {});
static OwnPtr<DebugSession> attach(pid_t pid, ByteString source_root = {}, Function<void(float)> on_initialization_progress = {});
virtual ~DebugSession() override;
@ -56,20 +56,20 @@ public:
};
struct InsertBreakpointAtSymbolResult {
DeprecatedString library_name;
ByteString library_name;
FlatPtr address { 0 };
};
Optional<InsertBreakpointAtSymbolResult> insert_breakpoint(DeprecatedString const& symbol_name);
Optional<InsertBreakpointAtSymbolResult> insert_breakpoint(ByteString const& symbol_name);
struct InsertBreakpointAtSourcePositionResult {
DeprecatedString library_name;
DeprecatedString filename;
ByteString library_name;
ByteString filename;
size_t line_number { 0 };
FlatPtr address { 0 };
};
Optional<InsertBreakpointAtSourcePositionResult> insert_breakpoint(DeprecatedString const& filename, size_t line_number);
Optional<InsertBreakpointAtSourcePositionResult> insert_breakpoint(ByteString const& filename, size_t line_number);
bool insert_breakpoint(FlatPtr address);
bool disable_breakpoint(FlatPtr address);
@ -132,7 +132,7 @@ public:
};
private:
explicit DebugSession(pid_t, DeprecatedString source_root, Function<void(float)> on_initialization_progress = {});
explicit DebugSession(pid_t, ByteString source_root, Function<void(float)> on_initialization_progress = {});
// x86 breakpoint instruction "int3"
static constexpr u8 BREAKPOINT_INSTRUCTION = 0xcc;
@ -140,14 +140,14 @@ private:
ErrorOr<void> update_loaded_libs();
int m_debuggee_pid { -1 };
DeprecatedString m_source_root;
ByteString m_source_root;
bool m_is_debuggee_dead { false };
HashMap<FlatPtr, BreakPoint> m_breakpoints;
HashMap<FlatPtr, WatchPoint> m_watchpoints;
// Maps from library name to LoadedLibrary object
HashMap<DeprecatedString, NonnullOwnPtr<LoadedLibrary>> m_loaded_libraries;
HashMap<ByteString, NonnullOwnPtr<LoadedLibrary>> m_loaded_libraries;
Function<void(float)> m_on_initialization_progress;
};