summaryrefslogtreecommitdiff
path: root/src/core/debugger/debugger.h
diff options
context:
space:
mode:
authorGravatar Mai M2022-06-01 00:19:49 -0400
committerGravatar GitHub2022-06-01 00:19:49 -0400
commitde2f2e5140eb85311e0fd844c580d6726adf7e03 (patch)
tree10f0e96a0689b2edb823f5833ff388ac9c645229 /src/core/debugger/debugger.h
parentMerge pull request #8401 from zhaobot/tx-update-20220601034505 (diff)
parentcore/debugger: Implement new GDB stub debugger (diff)
downloadyuzu-de2f2e5140eb85311e0fd844c580d6726adf7e03.tar.gz
yuzu-de2f2e5140eb85311e0fd844c580d6726adf7e03.tar.xz
yuzu-de2f2e5140eb85311e0fd844c580d6726adf7e03.zip
Merge pull request #8394 from liamwhite/debugger
core/debugger: Implement new GDB stub debugger
Diffstat (limited to 'src/core/debugger/debugger.h')
-rw-r--r--src/core/debugger/debugger.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/debugger/debugger.h b/src/core/debugger/debugger.h
new file mode 100644
index 000000000..7acd11815
--- /dev/null
+++ b/src/core/debugger/debugger.h
@@ -0,0 +1,46 @@
1// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <memory>
7
8#include "common/common_types.h"
9
10namespace Kernel {
11class KThread;
12}
13
14namespace Core {
15class System;
16
17class DebuggerImpl;
18
19class Debugger {
20public:
21 /**
22 * Blocks and waits for a connection on localhost, port `server_port`.
23 * Does not create the debugger if the port is already in use.
24 */
25 explicit Debugger(Core::System& system, u16 server_port);
26 ~Debugger();
27
28 /**
29 * Notify the debugger that the given thread is stopped
30 * (due to a breakpoint, or due to stopping after a successful step).
31 *
32 * The debugger will asynchronously halt emulation after the notification has
33 * occurred. If another thread attempts to notify before emulation has stopped,
34 * it is ignored and this method will return false. Otherwise it will return true.
35 */
36 bool NotifyThreadStopped(Kernel::KThread* thread);
37
38 /**
39 * Returns whether a step is in progress.
40 */
41 bool IsStepping() const;
42
43private:
44 std::unique_ptr<DebuggerImpl> impl;
45};
46} // namespace Core