GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
py-param.c File Reference
#include "defs.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"
#include "arch-utils.h"

Go to the source code of this file.

Classes

union  parmpy_variable
 
struct  parmpy_object
 

Enumerations

enum  doc_string_type { doc_string_set , doc_string_show , doc_string_description }
 

Functions

static setting make_setting (parmpy_object *s)
 
PyTypeObject parmpy_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("parmpy_object")
 
static PyObject * get_attr (PyObject *obj, PyObject *attr_name)
 
static int set_parameter_value (parmpy_object *self, PyObject *value)
 
static int set_attr (PyObject *obj, PyObject *attr_name, PyObject *val)
 
static std::string full_cmd_name_without_first_prefix (struct cmd_list_element *c)
 
static gdb::unique_xmalloc_ptr< char > get_doc_string (PyObject *object, enum doc_string_type doc_type, const char *cmd_name)
 
static gdb::unique_xmalloc_ptr< char > call_doc_function (PyObject *obj, PyObject *method, PyObject *arg)
 
static void get_set_value (const char *args, int from_tty, struct cmd_list_element *c)
 
static void get_show_value (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void add_setshow_generic (int parmclass, enum command_class cmdclass, gdb::unique_xmalloc_ptr< char > cmd_name, parmpy_object *self, const char *set_doc, const char *show_doc, const char *help_doc, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
 
static int compute_enum_values (parmpy_object *self, PyObject *enum_values)
 
static int parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
 
static void parmpy_dealloc (PyObject *obj)
 
int gdbpy_initialize_parameters (void)
 

Variables

struct {
   const char *   name
 
   int   value
 
parm_constants []
 
static PyObject * set_doc_cst
 
static PyObject * show_doc_cst
 
PyTypeObject parmpy_object_type
 

Enumeration Type Documentation

◆ doc_string_type

Enumerator
doc_string_set 
doc_string_show 
doc_string_description 

Definition at line 352 of file py-param.c.

Function Documentation

◆ add_setshow_generic()

static void add_setshow_generic ( int  parmclass,
enum command_class  cmdclass,
gdb::unique_xmalloc_ptr< char >  cmd_name,
parmpy_object self,
const char *  set_doc,
const char *  show_doc,
const char *  help_doc,
struct cmd_list_element **  set_list,
struct cmd_list_element **  show_list 
)
static

◆ call_doc_function()

static gdb::unique_xmalloc_ptr< char > call_doc_function ( PyObject *  obj,
PyObject *  method,
PyObject *  arg 
)
static

Definition at line 419 of file py-param.c.

References gdbpy_is_string(), and python_string_to_host_string().

Referenced by get_set_value(), and get_show_value().

◆ compute_enum_values()

static int compute_enum_values ( parmpy_object self,
PyObject *  enum_values 
)
static

Definition at line 659 of file py-param.c.

References parmpy_object::enumeration, gdbpy_is_string(), python_string_to_host_string(), and size.

Referenced by parmpy_init().

◆ CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF()

PyTypeObject parmpy_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ( "parmpy_object"  )

◆ full_cmd_name_without_first_prefix()

static std::string full_cmd_name_without_first_prefix ( struct cmd_list_element c)
static

Definition at line 339 of file py-param.c.

References cmd_list_element::command_components(), and components.

Referenced by get_show_value().

◆ gdbpy_initialize_parameters()

int gdbpy_initialize_parameters ( void  )

◆ get_attr()

static PyObject * get_attr ( PyObject *  obj,
PyObject *  attr_name 
)
static

Definition at line 126 of file py-param.c.

References gdbpy_parameter_value(), and make_setting().

◆ get_doc_string()

static gdb::unique_xmalloc_ptr< char > get_doc_string ( PyObject *  object,
enum doc_string_type  doc_type,
const char *  cmd_name 
)
static

◆ get_set_value()

static void get_set_value ( const char *  args,
int  from_tty,
struct cmd_list_element c 
)
static

◆ get_show_value()

static void get_show_value ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

◆ make_setting()

static setting make_setting ( parmpy_object s)
static

◆ parmpy_dealloc()

static void parmpy_dealloc ( PyObject *  obj)
static

◆ parmpy_init()

static int parmpy_init ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
)
static

◆ set_attr()

static int set_attr ( PyObject *  obj,
PyObject *  attr_name,
PyObject *  val 
)
static

Definition at line 313 of file py-param.c.

References set_parameter_value().

◆ set_parameter_value()

static int set_parameter_value ( parmpy_object self,
PyObject *  value 
)
static

Variable Documentation

◆ name

const char* name

Definition at line 33 of file py-param.c.

Referenced by gdbpy_initialize_parameters(), and parmpy_init().

◆ 

struct { ... } parm_constants[]
Initial value:
=
{
{ "PARAM_BOOLEAN", var_boolean },
{ "PARAM_AUTO_BOOLEAN", var_auto_boolean },
{ "PARAM_UINTEGER", var_uinteger },
{ "PARAM_INTEGER", var_integer },
{ "PARAM_STRING", var_string },
{ "PARAM_STRING_NOESCAPE", var_string_noescape },
{ "PARAM_OPTIONAL_FILENAME", var_optional_filename },
{ "PARAM_FILENAME", var_filename },
{ "PARAM_ZINTEGER", var_zinteger },
{ "PARAM_ZUINTEGER", var_zuinteger },
{ "PARAM_ZUINTEGER_UNLIMITED", var_zuinteger_unlimited },
{ "PARAM_ENUM", var_enum },
{ NULL, 0 }
}
@ var_optional_filename
Definition: command.h:106
@ var_integer
Definition: command.h:95
@ var_string
Definition: command.h:100
@ var_boolean
Definition: command.h:78
@ var_auto_boolean
Definition: command.h:85
@ var_zuinteger_unlimited
Definition: command.h:118
@ var_string_noescape
Definition: command.h:103
@ var_zuinteger
Definition: command.h:114
@ var_filename
Definition: command.h:108
@ var_zinteger
Definition: command.h:111
@ var_uinteger
Definition: command.h:89
@ var_enum
Definition: command.h:122

Referenced by gdbpy_initialize_parameters().

◆ parmpy_object_type

PyTypeObject parmpy_object_type

Definition at line 865 of file py-param.c.

Referenced by gdbpy_initialize_parameters().

◆ set_doc_cst

PyObject* set_doc_cst
static

Definition at line 119 of file py-param.c.

Referenced by gdbpy_initialize_parameters(), and get_doc_string().

◆ show_doc_cst

PyObject* show_doc_cst
static

Definition at line 120 of file py-param.c.

Referenced by gdbpy_initialize_parameters(), and get_doc_string().

◆ value

int value

Definition at line 34 of file py-param.c.