serenity/Userland/DevTools/HackStudio/Debugger/DisassemblyWidget.h
Ali Mohammad Pur 5e1499d104 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')
2023-12-17 18:25:10 +03:30

58 lines
1.4 KiB
C++

/*
* Copyright (c) 2020, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Debugger.h"
#include <AK/NonnullOwnPtr.h>
#include <LibGUI/Label.h>
#include <LibGUI/Model.h>
#include <LibGUI/TableView.h>
#include <LibGUI/Widget.h>
#include <sys/arch/regs.h>
namespace HackStudio {
class UnavailableDisassemblyWidget final : public GUI::Frame {
C_OBJECT(UnavailableDisassemblyWidget)
public:
virtual ~UnavailableDisassemblyWidget() override { }
ByteString const& reason() const { return m_reason; }
void set_reason(ByteString const& text) { m_reason = text; }
private:
UnavailableDisassemblyWidget(ByteString const& reason)
: m_reason(reason)
{
}
virtual void paint_event(GUI::PaintEvent& event) override;
ByteString m_reason;
};
class DisassemblyWidget final : public GUI::Widget {
C_OBJECT(DisassemblyWidget)
public:
virtual ~DisassemblyWidget() override { }
void update_state(Debug::DebugSession const&, PtraceRegisters const&);
void program_stopped();
private:
DisassemblyWidget();
void show_disassembly();
void hide_disassembly(ByteString const&);
RefPtr<GUI::Widget> m_top_container;
RefPtr<GUI::TableView> m_disassembly_view;
RefPtr<GUI::Label> m_function_name_label;
RefPtr<UnavailableDisassemblyWidget> m_unavailable_disassembly_widget;
};
}