GDB (xrefs)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
py_ui_out Class Reference
Inheritance diagram for py_ui_out:
ui_out

Public Member Functions

 py_ui_out ()
 
bool can_emit_style_escape () const override
 
bool do_is_mi_like_p () const override
 
PyObjectresult ()
 
- Public Member Functions inherited from ui_out
 ui_out (ui_out_flags flags=0)
 
virtual ~ui_out ()
 
void push_level (ui_out_type type)
 
void pop_level (ui_out_type type)
 
void table_begin (int nr_cols, int nr_rows, const std::string &tblid)
 
void table_header (int width, ui_align align, const std::string &col_name, const std::string &col_hdr)
 
void table_body ()
 
void table_end ()
 
void begin (ui_out_type type, const char *id)
 
void end (ui_out_type type)
 
void field_signed (const char *fldname, LONGEST value)
 
void field_fmt_signed (int width, ui_align align, const char *fldname, LONGEST value)
 
void field_unsigned (const char *fldname, ULONGEST value)
 
void field_core_addr (const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
 
void field_string (const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
 
void field_string (const char *fldname, const std::string &string, const ui_file_style &style=ui_file_style())
 
void field_stream (const char *fldname, string_file &stream, const ui_file_style &style=ui_file_style())
 
void field_skip (const char *fldname)
 
void field_fmt (const char *fldname, const char *format,...) ATTRIBUTE_PRINTF(3
 
void void field_fmt (const char *fldname, const ui_file_style &style, const char *format,...) ATTRIBUTE_PRINTF(4
 
void void void spaces (int numspaces)
 
void text (const char *string)
 
void text (const std::string &string)
 
void message (const char *format,...) ATTRIBUTE_PRINTF(2
 
void void vmessage (const ui_file_style &in_style, const char *format, va_list args) ATTRIBUTE_PRINTF(3
 
void void void wrap_hint (int indent)
 
void flush ()
 
void redirect (ui_file *outstream)
 
ui_out_flags test_flags (ui_out_flags mask)
 
bool is_mi_like_p () const
 
bool query_table_field (int colno, int *width, int *alignment, const char **col_name)
 

Protected Member Functions

void do_progress_end () override
 
void do_progress_start () override
 
void do_progress_notify (const std::string &, const char *, double, double) override
 
void do_table_begin (int nbrofcols, int nr_rows, const char *tblid) override
 
void do_table_body () override
 
void do_table_end () override
 
void do_table_header (int width, ui_align align, const std::string &col_name, const std::string &col_hdr) override
 
void do_begin (ui_out_type type, const char *id) override
 
void do_end (ui_out_type type) override
 
void do_field_signed (int fldno, int width, ui_align align, const char *fldname, LONGEST value) override
 
void do_field_unsigned (int fldno, int width, ui_align align, const char *fldname, ULONGEST value) override
 
void do_field_skip (int fldno, int width, ui_align align, const char *fldname) override
 
void do_field_string (int fldno, int width, ui_align align, const char *fldname, const char *string, const ui_file_style &style) override
 
void do_field_fmt (int fldno, int width, ui_align align, const char *fldname, const ui_file_style &style, const char *format, va_list args) override ATTRIBUTE_PRINTF(7
 
void void do_spaces (int numspaces) override
 
void do_text (const char *string) override
 
void do_message (const ui_file_style &style, const char *format, va_list args) override ATTRIBUTE_PRINTF(3
 
object_desc & current ()
 
void add_field (const char *name, const gdbpy_ref<> &obj)
 
- Protected Member Functions inherited from ui_out
virtual void virtual void do_wrap_hint (int indent)=0
 
virtual void do_flush ()=0
 
virtual void do_redirect (struct ui_file *outstream)=0
 

Protected Attributes

void std::vector< object_desc > m_objects
 
gdb::optional< gdbpy_err_fetchm_error
 

Detailed Description

Definition at line 28 of file py-mi.c.

Constructor & Destructor Documentation

◆ py_ui_out()

py_ui_out::py_ui_out ( )
inline

Definition at line 32 of file py-mi.c.

References do_begin(), and ui_out_type_tuple.

Member Function Documentation

◆ add_field()

void py_ui_out::add_field ( const char * name,
const gdbpy_ref<> & obj )
protected

Definition at line 153 of file py-mi.c.

References current(), m_error, name, and ui_out_type_list.

Referenced by do_end(), do_field_signed(), do_field_string(), and do_field_unsigned().

◆ can_emit_style_escape()

bool py_ui_out::can_emit_style_escape ( ) const
inlineoverridevirtual

Implements ui_out.

Definition at line 39 of file py-mi.c.

◆ current()

object_desc & py_ui_out::current ( )
inlineprotected

Definition at line 145 of file py-mi.c.

References m_objects.

Referenced by add_field(), do_end(), and result().

◆ do_begin()

void py_ui_out::do_begin ( ui_out_type type,
const char * id )
overrideprotectedvirtual

Implements ui_out.

Definition at line 175 of file py-mi.c.

References m_error, m_objects, type, and ui_out_type_list.

Referenced by do_table_begin(), and py_ui_out().

◆ do_end()

void py_ui_out::do_end ( ui_out_type type)
overrideprotectedvirtual

Implements ui_out.

Definition at line 199 of file py-mi.c.

References add_field(), current(), m_error, and m_objects.

Referenced by do_table_end().

◆ do_field_fmt()

void py_ui_out::do_field_fmt ( int fldno,
int width,
ui_align align,
const char * fldname,
const ui_file_style & style,
const char * format,
va_list args )
overrideprotectedvirtual

Reimplemented from ui_out.

Definition at line 244 of file py-mi.c.

References do_field_string(), and m_error.

◆ do_field_signed()

void py_ui_out::do_field_signed ( int fldno,
int width,
ui_align align,
const char * fldname,
LONGEST value )
overrideprotectedvirtual

Implements ui_out.

Definition at line 210 of file py-mi.c.

References add_field(), gdb_py_object_from_longest(), and m_error.

◆ do_field_skip()

void py_ui_out::do_field_skip ( int fldno,
int width,
ui_align align,
const char * fldname )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 89 of file py-mi.c.

◆ do_field_string()

void py_ui_out::do_field_string ( int fldno,
int width,
ui_align align,
const char * fldname,
const char * string,
const ui_file_style & style )
overrideprotectedvirtual

Implements ui_out.

Definition at line 232 of file py-mi.c.

References add_field(), host_string_to_python_string(), and m_error.

Referenced by do_field_fmt().

◆ do_field_unsigned()

void py_ui_out::do_field_unsigned ( int fldno,
int width,
ui_align align,
const char * fldname,
ULONGEST value )
overrideprotectedvirtual

Implements ui_out.

Definition at line 221 of file py-mi.c.

References add_field(), gdb_py_object_from_ulongest(), and m_error.

◆ do_is_mi_like_p()

bool py_ui_out::do_is_mi_like_p ( ) const
inlineoverridevirtual

Reimplemented from ui_out.

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

◆ do_message()

void py_ui_out::do_message ( const ui_file_style & style,
const char * format,
va_list args )
overrideprotectedvirtual

Reimplemented from ui_out.

◆ do_progress_end()

void py_ui_out::do_progress_end ( )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 60 of file py-mi.c.

◆ do_progress_notify()

void py_ui_out::do_progress_notify ( const std::string & ,
const char * ,
double ,
double  )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 62 of file py-mi.c.

◆ do_progress_start()

void py_ui_out::do_progress_start ( )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 61 of file py-mi.c.

◆ do_spaces()

void void py_ui_out::do_spaces ( int numspaces)
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 101 of file py-mi.c.

◆ do_table_begin()

void py_ui_out::do_table_begin ( int nbrofcols,
int nr_rows,
const char * tblid )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 66 of file py-mi.c.

References do_begin(), and ui_out_type_list.

◆ do_table_body()

void py_ui_out::do_table_body ( )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 70 of file py-mi.c.

◆ do_table_end()

void py_ui_out::do_table_end ( )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 72 of file py-mi.c.

References do_end(), and ui_out_type_list.

◆ do_table_header()

void py_ui_out::do_table_header ( int width,
ui_align align,
const std::string & col_name,
const std::string & col_hdr )
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 76 of file py-mi.c.

◆ do_text()

void py_ui_out::do_text ( const char * string)
inlineoverrideprotectedvirtual

Implements ui_out.

Definition at line 104 of file py-mi.c.

◆ result()

PyObject * py_ui_out::result ( )
inline

Definition at line 48 of file py-mi.c.

References current(), and m_error.

Referenced by gdbpy_execute_mi_command().

Member Data Documentation

◆ m_error

gdb::optional<gdbpy_err_fetch> py_ui_out::m_error
protected

◆ m_objects

void std::vector<object_desc> py_ui_out::m_objects
protected
Initial value:
{ }
void do_wrap_hint (int indent) override
{ }
void do_flush () override
{ }
void do_redirect (struct ui_file *outstream) override
{ }
private:
struct object_desc
{
std::string field_name;
}
virtual void virtual void do_wrap_hint(int indent)=0
virtual void do_flush()=0
virtual void do_redirect(struct ui_file *outstream)=0
gdb::ref_ptr< T, gdbpy_ref_policy< T > > gdbpy_ref
Definition py-ref.h:42
static gdbpy_ref field_name(struct type *type, int field)
Definition py-type.c:234
enum var_types type
Definition scm-param.c:142
ui_out_type
Definition ui-out.h:70

Definition at line 138 of file py-mi.c.

Referenced by current(), do_begin(), and do_end().


The documentation for this class was generated from the following file: