1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
/* foundry-debugger.h
*
* Copyright 2024 Christian Hergert <chergert@redhat.com>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#pragma once
#include <gio/gio.h>
#include "foundry-contextual.h"
G_BEGIN_DECLS
#define FOUNDRY_TYPE_DEBUGGER (foundry_debugger_get_type())
#define FOUNDRY_TYPE_DEBUGGER_MOVEMENT (foundry_debugger_movement_get_type())
FOUNDRY_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (FoundryDebugger, foundry_debugger, FOUNDRY, DEBUGGER, FoundryContextual)
struct _FoundryDebuggerClass
{
FoundryContextualClass parent_class;
char *(*dup_name) (FoundryDebugger *self);
DexFuture *(*initialize) (FoundryDebugger *self);
DexFuture *(*connect_to_target) (FoundryDebugger *self,
FoundryDebuggerTarget *target);
GListModel *(*list_address_space) (FoundryDebugger *self);
GListModel *(*list_modules) (FoundryDebugger *self);
GListModel *(*list_traps) (FoundryDebugger *self);
GListModel *(*list_threads) (FoundryDebugger *self);
GListModel *(*list_thread_groups) (FoundryDebugger *self);
DexFuture *(*disassemble) (FoundryDebugger *self,
guint64 begin_address,
guint64 end_address);
DexFuture *(*interpret) (FoundryDebugger *self,
const char *command);
DexFuture *(*interrupt) (FoundryDebugger *self);
DexFuture *(*stop) (FoundryDebugger *self);
DexFuture *(*send_signal) (FoundryDebugger *self,
int signum);
DexFuture *(*move) (FoundryDebugger *self,
FoundryDebuggerMovement movement);
DexFuture *(*trap) (FoundryDebugger *self,
FoundryDebuggerTrapParams *params);
gboolean (*can_move) (FoundryDebugger *self,
FoundryDebuggerMovement movement);
void (*event) (FoundryDebugger *self,
FoundryDebuggerEvent *event);
GListModel *(*list_log_messages) (FoundryDebugger *self);
FoundryDebuggerThread *(*dup_primary_thread) (FoundryDebugger *self);
gboolean (*has_terminated) (FoundryDebugger *self);
/*< private >*/
gpointer _reserved[12];
};
FOUNDRY_AVAILABLE_IN_ALL
GType foundry_debugger_movement_get_type (void) G_GNUC_CONST;
FOUNDRY_AVAILABLE_IN_ALL
char *foundry_debugger_dup_name (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_ALL
DexFuture *foundry_debugger_initialize (FoundryDebugger *self) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_AVAILABLE_IN_ALL
DexFuture *foundry_debugger_connect_to_target (FoundryDebugger *self,
FoundryDebuggerTarget *target) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_AVAILABLE_IN_ALL
GListModel *foundry_debugger_list_address_space (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_ALL
GListModel *foundry_debugger_list_modules (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_ALL
GListModel *foundry_debugger_list_traps (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_ALL
GListModel *foundry_debugger_list_threads (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_ALL
GListModel *foundry_debugger_list_thread_groups (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_ALL
DexFuture *foundry_debugger_disassemble (FoundryDebugger *self,
guint64 begin_address,
guint64 end_address) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_AVAILABLE_IN_ALL
DexFuture *foundry_debugger_interpret (FoundryDebugger *self,
const char *command) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_DEPRECATED_IN_1_1_FOR(foundry_debugger_thread_interrupt)
DexFuture *foundry_debugger_interrupt (FoundryDebugger *self) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_AVAILABLE_IN_ALL
DexFuture *foundry_debugger_send_signal (FoundryDebugger *self,
int signum) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_AVAILABLE_IN_ALL
DexFuture *foundry_debugger_stop (FoundryDebugger *self) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_DEPRECATED_IN_1_1_FOR(foundry_debugger_thread_can_move)
gboolean foundry_debugger_can_move (FoundryDebugger *self,
FoundryDebuggerMovement movement);
FOUNDRY_DEPRECATED_IN_1_1_FOR(foundry_debugger_thread_move)
DexFuture *foundry_debugger_move (FoundryDebugger *self,
FoundryDebuggerMovement movement) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_AVAILABLE_IN_ALL
DexFuture *foundry_debugger_trap (FoundryDebugger *self,
FoundryDebuggerTrapParams *params) G_GNUC_WARN_UNUSED_RESULT;
FOUNDRY_AVAILABLE_IN_ALL
void foundry_debugger_emit_event (FoundryDebugger *self,
FoundryDebuggerEvent *event);
FOUNDRY_AVAILABLE_IN_1_1
GListModel *foundry_debugger_list_log_messages (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_1_1
FoundryDebuggerThread *foundry_debugger_dup_primary_thread (FoundryDebugger *self);
FOUNDRY_AVAILABLE_IN_1_1
gboolean foundry_debugger_has_terminated (FoundryDebugger *self);
G_END_DECLS
|