TEMU  4.4
The Terma Emulator
GdbServer.h
Go to the documentation of this file.
1 //===-- temu-c/GdbServer.h - GdbServer API ------------------------*- C++ -*-===//
2 //
3 // TEMU: The Terma Emulator
4 // (c) Terma 2015
5 // Authors: Mattias Holm <maho@terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_GDBSERVER_H
10 #define TEMU_GDBSERVER_H
11 
12 /**!
13  * Deprecated library
14  *
15  * The GDB server library has been deprecated in favour
16  * of the GdbDebugger plugin.
17  *
18  * The GDB debugger plugin supports running the GDB server in a separate thread,
19  * and works with the TEMU Scheduler.
20  *
21  * This server is still around for the time beeing, since it is compatible with
22  * the Machine model.
23  *
24  * This server library is expected to be removed in TEMU 5.
25 */
26 
27 #include <stdint.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 //! Initialise the GDB Server Library
33 void temu_initGdbServerLib(void);
34 
35 //! Create a new GDB server
36 //!
37 //! \param Port TCP port to start server on.
38 //! \result Opaque handle to GDB server.
39 void* temu_createGdbServer(uint16_t Port);
40 
41 //! Dispose a GDB server
42 //!
43 //! \param Gdb Pointer returned by `temu_createGdbServer()`
44 void temu_disposeGdbServer(void *Gdb);
45 
46 //! Wait current thread for a user to connect
47 //!
48 //! \param Gdb Pointer returned by `temu_createGdbServer()`
49 void temu_gdbWaitForConnection(void *Gdb);
50 
51 //! Add named machine to GDB server
52 //!
53 //! \param Gdb Pointer returned by `temu_createGdbServer()`
54 //! \param MachineName Name of `Machine` object.
55 void temu_gdbAddMachine(void *Gdb, const char *MachineName);
56 
57 //! Add named CPU to GDB server
58 //!
59 //! \param Gdb Pointer returned by `temu_createGdbServer()`
60 //! \param CpuName Name of processor object.
61 void temu_gdbAddCpu(void *Gdb, const char *CpuName);
62 
63 //! Tell GDB server to stop at next safe point in time.
64 //!
65 //! \param Gdb Pointer returned by `temu_createGdbServer()`
66 void temu_gdbAsyncStop(void *Gdb);
67 
68 //! Run the GDB server loop
69 //!
70 //! \param Gdb Pointer returned by `temu_createGdbServer()`
71 int temu_gdbRun(void *Gdb);
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 
78 #endif /* TEMU_GDBSERVER_H */
temu_createGdbServer
void * temu_createGdbServer(uint16_t Port)
temu_gdbAddCpu
void temu_gdbAddCpu(void *Gdb, const char *CpuName)
temu_gdbWaitForConnection
void temu_gdbWaitForConnection(void *Gdb)
temu_gdbAddMachine
void temu_gdbAddMachine(void *Gdb, const char *MachineName)
temu_initGdbServerLib
void temu_initGdbServerLib(void)
Initialise the GDB Server Library.
temu_gdbRun
int temu_gdbRun(void *Gdb)
temu_gdbAsyncStop
void temu_gdbAsyncStop(void *Gdb)
temu_disposeGdbServer
void temu_disposeGdbServer(void *Gdb)