GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Functions | Variables
gdb.dap.server Namespace Reference

Classes

class  Server
 

Functions

 send_event (event, body=None)
 
 _check_not_running (func)
 
 request (str name, *bool response=True, bool on_dap_thread=False, bool expect_stopped=True)
 
 capability (name, value=True)
 
 client_bool_capability (name)
 
 initialize (**args)
 
 terminate (**args)
 
 disconnect (*bool terminateDebuggee=False, **args)
 

Variables

dict _capabilities = {}
 
dict _commands = {}
 
 _server = None
 

Function Documentation

◆ _check_not_running()

gdb.dap.server._check_not_running ( func)
protected

Definition at line 168 of file server.py.

References func.

Referenced by gdb.dap.server.request(), and gdb.dap.server.Server.shutdown().

◆ capability()

gdb.dap.server.capability ( name,
value = True )
A decorator that indicates that the wrapper function implements
the DAP capability NAME.

Definition at line 260 of file server.py.

◆ client_bool_capability()

gdb.dap.server.client_bool_capability ( name)
Return the value of a boolean client capability.

If the capability was not specified, or did not have boolean type,
False is returned.

Definition at line 272 of file server.py.

◆ disconnect()

gdb.dap.server.disconnect ( *bool terminateDebuggee = False,
** args )

Definition at line 299 of file server.py.

◆ initialize()

gdb.dap.server.initialize ( ** args)

Definition at line 284 of file server.py.

◆ request()

gdb.dap.server.request ( str name,
*bool response = True,
bool on_dap_thread = False,
bool expect_stopped = True )
A decorator for DAP requests.

This registers the function as the implementation of the DAP
request NAME.  By default, the function is invoked in the gdb
thread, and its result is returned as the 'body' of the DAP
response.

Some keyword arguments are provided as well:

If RESPONSE is False, the result of the function will not be
waited for and no 'body' will be in the response.

If ON_DAP_THREAD is True, the function will be invoked in the DAP
thread.  When ON_DAP_THREAD is True, RESPONSE may not be False.

If EXPECT_STOPPED is True (the default), then the request will
fail with the 'notStopped' reason if it is processed while the
inferior is running.  When EXPECT_STOPPED is False, the request
will proceed regardless of the inferior's state.

Definition at line 182 of file server.py.

References gdb.dap.server._check_not_running(), and func.

◆ send_event()

gdb.dap.server.send_event ( event,
body = None )
Send an event to the DAP client.
EVENT is the name of the event, a string.
BODY is the body of the event, an arbitrary object.

Definition at line 159 of file server.py.

◆ terminate()

gdb.dap.server.terminate ( ** args)

Definition at line 293 of file server.py.

Variable Documentation

◆ _capabilities

dict gdb.dap.server._capabilities = {}
protected

Definition at line 37 of file server.py.

◆ _commands

dict gdb.dap.server._commands = {}
protected

Definition at line 40 of file server.py.

◆ _server

gdb.dap.server._server = None
protected

Definition at line 43 of file server.py.