GDB (xrefs)
Classes | Macros | Typedefs | Functions | Variables
py-cmd.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "value.h"
#include "python-internal.h"
#include "charset.h"
#include "gdbcmd.h"
#include "cli/cli-decode.h"
#include "completer.h"
#include "language.h"

Go to the source code of this file.

Classes

struct  cmdpy_completer
 
struct  cmdpy_object
 

Macros

#define N_COMPLETERS   (sizeof (completers) / sizeof (completers[0]))
 

Typedefs

typedef struct cmdpy_object cmdpy_object
 

Functions

PyTypeObject cmdpy_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("cmdpy_object")
 
static PyObject * cmdpy_dont_repeat (PyObject *self, PyObject *args)
 
static void cmdpy_destroyer (struct cmd_list_element *self, void *context)
 
static void cmdpy_function (struct cmd_list_element *command, char *args, int from_tty)
 
static PyObject * cmdpy_completer_helper (struct cmd_list_element *command, const char *text, const char *word)
 
static void cmdpy_completer_handle_brkchars (struct cmd_list_element *command, const char *text, const char *word)
 
static VEC (char_ptr)
 
char * gdbpy_parse_command_name (const char *name, struct cmd_list_element ***base_list, struct cmd_list_element **start_list)
 
static int cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
 
int gdbpy_initialize_commands (void)
 
PyObject * gdbpy_string_to_argv (PyObject *self, PyObject *args)
 

Variables

static const struct cmdpy_completer completers []
 
static PyObject * invoke_cst
 
static PyObject * complete_cst
 
static PyMethodDef cmdpy_object_methods []
 
PyTypeObject cmdpy_object_type
 

Macro Definition Documentation

#define N_COMPLETERS   (sizeof (completers) / sizeof (completers[0]))

Typedef Documentation

typedef struct cmdpy_object cmdpy_object

Definition at line 71 of file py-cmd.c.

Function Documentation

static void cmdpy_completer_handle_brkchars ( struct cmd_list_element command,
const char *  text,
const char *  word 
)
static
static PyObject* cmdpy_completer_helper ( struct cmd_list_element command,
const char *  text,
const char *  word 
)
static

Definition at line 240 of file py-cmd.c.

References _, complete_cst, error(), get_cmd_context(), host_charset(), and Py_DECREF.

Referenced by cmdpy_completer_handle_brkchars(), and VEC().

static void cmdpy_destroyer ( struct cmd_list_element self,
void *  context 
)
static
static PyObject* cmdpy_dont_repeat ( PyObject *  self,
PyObject *  args 
)
static

Definition at line 84 of file py-cmd.c.

References dont_repeat().

static void cmdpy_function ( struct cmd_list_element command,
char *  args,
int  from_tty 
)
static
static int cmdpy_init ( PyObject *  self,
PyObject *  args,
PyObject *  kw 
)
static
PyTypeObject cmdpy_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "cmdpy_object"  )
int gdbpy_initialize_commands ( void  )
char* gdbpy_parse_command_name ( const char *  name,
struct cmd_list_element ***  base_list,
struct cmd_list_element **  start_list 
)

Definition at line 428 of file py-cmd.c.

References _, CMD_LIST_AMBIGUOUS, len, lookup_cmd_1(), cmd_list_element::prefixlist, xfree(), and xmalloc().

Referenced by cmdpy_init(), and parmpy_init().

PyObject* gdbpy_string_to_argv ( PyObject *  self,
PyObject *  args 
)

Definition at line 786 of file py-cmd.c.

References gdb_buildargv(), and Py_DECREF.

static VEC ( char_ptr  )
static

Variable Documentation

PyMethodDef cmdpy_object_methods[]
static
Initial value:
=
{
{ "dont_repeat", cmdpy_dont_repeat, METH_NOARGS,
"Prevent command repetition when user enters empty line." },
{ 0 }
}
static PyObject * cmdpy_dont_repeat(PyObject *self, PyObject *args)
Definition: py-cmd.c:84

Definition at line 727 of file py-cmd.c.

PyTypeObject cmdpy_object_type

Definition at line 735 of file py-cmd.c.

Referenced by gdbpy_initialize_commands().

PyObject* complete_cst
static

Definition at line 78 of file py-cmd.c.

Referenced by cmdpy_completer_helper(), and gdbpy_initialize_commands().

const struct cmdpy_completer completers[]
static
Initial value:
=
{
{ "COMPLETE_NONE", noop_completer },
{ "COMPLETE_FILENAME", filename_completer },
{ "COMPLETE_LOCATION", location_completer },
{ "COMPLETE_COMMAND", command_completer },
{ "COMPLETE_SYMBOL", make_symbol_completion_list_fn },
{ "COMPLETE_EXPRESSION", expression_completer },
}

Definition at line 42 of file py-cmd.c.

PyObject* invoke_cst
static

Definition at line 77 of file py-cmd.c.

Referenced by cmdpy_function(), cmdpy_init(), and gdbpy_initialize_commands().