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  py_param_types {
  param_boolean , param_auto_boolean , param_uinteger , param_integer ,
  param_string , param_string_noescape , param_optional_filename , param_filename ,
  param_zinteger , param_zuinteger , param_zuinteger_unlimited , param_enum
}
 
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 PyObjectget_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 (enum var_types type, const literal_def *extra_literals, 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)
 
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_parameters (void)
 
 GDBPY_INITIALIZE_FILE (gdbpy_initialize_parameters)
 

Variables

struct { 
 
   enum var_types   type 
 
   const literal_def *   extra_literals 
 
param_to_var [] 
 
struct { 
 
   const char *   name 
 
   int   value 
 
parm_constants [] 
 
static PyObjectset_doc_cst
 
static PyObjectshow_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 432 of file py-param.c.

◆ py_param_types

Enumerator
param_boolean 
param_auto_boolean 
param_uinteger 
param_integer 
param_string 
param_string_noescape 
param_optional_filename 
param_filename 
param_zinteger 
param_zuinteger 
param_zuinteger_unlimited 
param_enum 

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

Function Documentation

◆ add_setshow_generic()

static void add_setshow_generic ( enum var_types type,
const literal_def * extra_literals,
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 499 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 726 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" )
extern

◆ full_cmd_name_without_first_prefix()

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

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

References cmd_list_element::command_components().

Referenced by get_show_value().

◆ GDBPY_INITIALIZE_FILE()

GDBPY_INITIALIZE_FILE ( gdbpy_initialize_parameters )

◆ gdbpy_initialize_parameters()

static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_parameters ( void )
static

◆ get_attr()

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

Definition at line 176 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 393 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

◆ extra_literals

const literal_def* extra_literals

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

Referenced by add_setshow_generic(), parmpy_init(), and set_parameter_value().

◆ name

const char* name

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

Referenced by gdbpy_initialize_parameters(), and parmpy_init().

◆ [struct]

const struct { ... } param_to_var[]
Initial value:
=
{
}
const literal_def pinteger_unlimited_literals[]
const literal_def integer_unlimited_literals[]
const literal_def uinteger_unlimited_literals[]
@ var_optional_filename
Definition command.h:108
@ var_pinteger
Definition command.h:97
@ var_integer
Definition command.h:93
@ var_string
Definition command.h:102
@ var_boolean
Definition command.h:78
@ var_auto_boolean
Definition command.h:85
@ var_string_noescape
Definition command.h:105
@ var_filename
Definition command.h:110
@ var_uinteger
Definition command.h:89
@ var_enum
Definition command.h:114

Referenced by parmpy_init().

◆ [struct]

struct { ... } parm_constants[]
Initial value:
=
{
{ "PARAM_BOOLEAN", param_boolean },
{ "PARAM_AUTO_BOOLEAN", param_auto_boolean },
{ "PARAM_UINTEGER", param_uinteger },
{ "PARAM_INTEGER", param_integer },
{ "PARAM_STRING", param_string },
{ "PARAM_STRING_NOESCAPE", param_string_noescape },
{ "PARAM_OPTIONAL_FILENAME", param_optional_filename },
{ "PARAM_FILENAME", param_filename },
{ "PARAM_ZINTEGER", param_zinteger },
{ "PARAM_ZUINTEGER", param_zuinteger },
{ "PARAM_ZUINTEGER_UNLIMITED", param_zuinteger_unlimited },
{ "PARAM_ENUM", param_enum },
{ NULL, 0 }
}
@ param_boolean
Definition py-param.c:35
@ param_integer
Definition py-param.c:38
@ param_auto_boolean
Definition py-param.c:36
@ param_uinteger
Definition py-param.c:37
@ param_string_noescape
Definition py-param.c:40
@ param_zuinteger
Definition py-param.c:44
@ param_optional_filename
Definition py-param.c:41
@ param_zinteger
Definition py-param.c:43
@ param_zuinteger_unlimited
Definition py-param.c:45
@ param_enum
Definition py-param.c:46
@ param_string
Definition py-param.c:39
@ param_filename
Definition py-param.c:42

Referenced by gdbpy_initialize_parameters().

◆ parmpy_object_type

PyTypeObject parmpy_object_type

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

Referenced by gdbpy_initialize_parameters().

◆ set_doc_cst

PyObject* set_doc_cst
static

Definition at line 169 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 170 of file py-param.c.

Referenced by gdbpy_initialize_parameters(), and get_doc_string().

◆ type

enum var_types type

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

Referenced by parmpy_init().

◆ value

int value

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

Referenced by abs_op(), ada_get_decoded_value(), ada_varobj_ind(), ada_varobj_simple_array_elt(), ada_varobj_struct_elt(), add_symbol_file_command(), address_from_register(), adi_available(), arc_insn_get_branch_target(), arc_insn_get_memory_offset(), arc_insn_get_operand_value(), arc_insn_get_operand_value_signed(), attribute::as_virtuality(), asr_op(), asrq_op(), bppy_set_hit_count(), bppy_set_ignore_count(), c_value_of_child(), cmdpy_completer(), cmdpy_completer_handle_brkchars(), compute_vtable_size(), convert_from_hex_encoded(), convert_value_from_python(), cplus_describe_child(), cplus_type_from_type_info(), cplus_typeid(), cplus_typename_from_type_info(), cplus_value_of_child(), default_value_from_register(), attribute::defaulted(), tui_ui_out::do_field_signed(), do_sign_or_zero_extend(), dwarf2_access_attribute(), dwarf2_compute_name(), dwarf2_const_value(), dwarf2_fetch_constant_bytes(), elf_gnu_ifunc_resolver_return_stop(), eval_op_structop_ptr(), expr::c_string_operation::evaluate(), expr::structop_base_operation::evaluate_funcall(), extended_color(), extended_offset(), fbsd_core_info_proc_status(), fnpy_call(), cooked_indexer::form_addr(), fortran_argument_convert(), frame_register_unwind(), frame_unwind_register_value(), gdbpy_default_visualizer(), gdbpy_parse_register_id(), gdbscm_lazy_string_to_value(), gdbscm_set_breakpoint_hit_count_x(), gdbscm_set_breakpoint_ignore_count_x(), gdbscm_set_iterator_progress_x(), get_data_from_address(), get_return_value(), i386_darwin_dr_set(), info_vtbl_command(), insert_exception_resume_breakpoint(), jit_unwind_reg_get_impl(), rust_parser::lex_character(), lex_multibyte_char(), rust_parser::lex_string(), linux_xfer_osdata_cpus(), lsscm_safe_lazy_string_to_value(), lwp_set_debug_registers_changed(), m32c_srcdest_store(), m68hc11_frame_prev_register(), maint_set_debuginfod_download_sections(), mep_frame_prev_register(), mep_push_dummy_call(), mi_cmd_data_write_memory(), mi_cmd_data_write_register_values(), mips_linux_watch_set_watchhi(), mips_linux_watch_set_watchlo(), objfpy_set_printers(), objfpy_set_type_printers(), pascm_print_param_smob(), print_gp_register_row(), print_wchar(), processInt(), pspy_set_printers(), pspy_set_type_printers(), read_encoded_value(), record_text_segment_lowaddr(), ref_add(), regcache_raw_get_signed(), remote_target::remote_parse_stop_reply(), remote_target::remote_query_supported(), selftests::array_view_tests::require_not_constructible(), resolve_dynamic_array_or_string(), resolve_dynamic_array_or_string_1(), resolve_dynamic_range(), resolve_dynamic_type_internal(), rocm_bfd_iovec_open(), s390_value_from_register(), gdb::option::save_option_value_in_ctx(), sentinel_frame_prev_register(), serialize_mi_result(), serialize_mi_result_1(), set_debuginfod_enabled(), value::set_initialized(), type::set_is_multi_dimensional(), set_precise_memory_mode(), set_remote_protocol_packet_cmd(), symbol::set_value_longest(), skip_command(), stap_modify_semaphore(), pv_area::store(), str_value_from_setting(), selftests::function_view::test_function_view(), windows_nat::windows_thread_info::thread_name(), threadref_to_int(), try_strtoulst(), unpack_mips16(), update_enumeration_type_from_children(), valpy_init(), value_from_host_double(), value_from_setting(), value_of_child(), value_of_root(), vlscm_convert_bytevector(), vlscm_convert_typed_value_from_scheme(), vlscm_scm_from_value_no_release(), windows_fetch_one_register(), x86_linux_dr_get(), xtensa_pseudo_register_read(), xtensa_pseudo_register_write(), xtensa_read_register(), xtensa_register_read_masked(), xtensa_register_write_masked(), and z80_scan_prologue().