summaryrefslogtreecommitdiff
path: root/src/core/debugger/debugger.h
diff options
context:
space:
mode:
authorGravatar Liam2022-05-30 19:35:01 -0400
committerGravatar Liam2022-06-01 00:01:25 -0400
commitfb4b3c127f7c390358d7f4cadd2f58de116fec48 (patch)
treee2588a859d364a32be0cd9e0401a345c6492d1a7 /src/core/debugger/debugger.h
parentMerge pull request #8368 from german77/seventimes (diff)
downloadyuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar.gz
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.tar.xz
yuzu-fb4b3c127f7c390358d7f4cadd2f58de116fec48.zip
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