mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 13:53:29 +08:00
* ui-out.c (ui_out_table_begin): Add parameter ``nr_rows''.
(default_table_begin): Ditto. * breakpoint.c (breakpoint_1): Pass nr_printable_breakpoints to ui_out_table_begin. Update everything.
This commit is contained in:
@ -1,3 +1,14 @@
|
|||||||
|
2001-06-18 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
* ui-out.c (ui_out_table_begin): Add parameter ``nr_rows''.
|
||||||
|
(default_table_begin): Ditto.
|
||||||
|
(uo_table_begin): Ditto.
|
||||||
|
* cli-out.c (cli_table_begin): Ditto.
|
||||||
|
* ui-out.h (ui_out_table_begin): Update
|
||||||
|
(table_begin_ftype): Update.
|
||||||
|
* breakpoint.c (breakpoint_1): Pass nr_printable_breakpoints to
|
||||||
|
ui_out_table_begin.
|
||||||
|
|
||||||
2001-06-16 Andrew Cagney <ac131313@redhat.com>
|
2001-06-16 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* breakpoint.c (breakpoint_1): Restructure. Compute the
|
* breakpoint.c (breakpoint_1): Restructure. Compute the
|
||||||
|
@ -3591,9 +3591,9 @@ breakpoint_1 (int bnum, int allflag)
|
|||||||
|
|
||||||
#ifdef UI_OUT
|
#ifdef UI_OUT
|
||||||
if (addressprint)
|
if (addressprint)
|
||||||
ui_out_table_begin (uiout, 6, "BreakpointTable");
|
ui_out_table_begin (uiout, 6, nr_printable_breakpoints, "BreakpointTable");
|
||||||
else
|
else
|
||||||
ui_out_table_begin (uiout, 5, "BreakpointTable");
|
ui_out_table_begin (uiout, 5, nr_printable_breakpoints, "BreakpointTable");
|
||||||
#endif /* UI_OUT */
|
#endif /* UI_OUT */
|
||||||
|
|
||||||
#ifdef UI_OUT
|
#ifdef UI_OUT
|
||||||
|
@ -39,7 +39,7 @@ struct ui_out_data
|
|||||||
/* These are the CLI output functions */
|
/* These are the CLI output functions */
|
||||||
|
|
||||||
static void cli_table_begin (struct ui_out *uiout, int nbrofcols,
|
static void cli_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
const char *tblid);
|
int nr_rows, const char *tblid);
|
||||||
static void cli_table_body (struct ui_out *uiout);
|
static void cli_table_body (struct ui_out *uiout);
|
||||||
static void cli_table_end (struct ui_out *uiout);
|
static void cli_table_end (struct ui_out *uiout);
|
||||||
static void cli_table_header (struct ui_out *uiout, int width,
|
static void cli_table_header (struct ui_out *uiout, int width,
|
||||||
@ -108,6 +108,7 @@ static void out_field_fmt (struct ui_out *uiout, int fldno,
|
|||||||
|
|
||||||
void
|
void
|
||||||
cli_table_begin (struct ui_out *uiout, int nbrofcols,
|
cli_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
|
int nr_rows,
|
||||||
const char *tblid)
|
const char *tblid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2001-06-18 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
* mi-out.c: Include "gdb_assert.h".
|
||||||
|
(mi_table_begin): Add parameter ``nr_rows''.
|
||||||
|
|
||||||
2001-06-18 Andrew Cagney <ac131313@redhat.com>
|
2001-06-18 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* mi-main.c: Use strncmp as the "mi" test. Allow "mi", "mi0" and
|
* mi-main.c: Use strncmp as the "mi" test. Allow "mi", "mi0" and
|
||||||
|
@ -40,7 +40,7 @@ struct ui_out_data
|
|||||||
/* These are the MI output functions */
|
/* These are the MI output functions */
|
||||||
|
|
||||||
static void mi_table_begin (struct ui_out *uiout, int nbrofcols,
|
static void mi_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
const char *tblid);
|
int nr_rows, const char *tblid);
|
||||||
static void mi_table_body (struct ui_out *uiout);
|
static void mi_table_body (struct ui_out *uiout);
|
||||||
static void mi_table_end (struct ui_out *uiout);
|
static void mi_table_end (struct ui_out *uiout);
|
||||||
static void mi_table_header (struct ui_out *uiout, int width,
|
static void mi_table_header (struct ui_out *uiout, int width,
|
||||||
@ -106,6 +106,7 @@ static void out_field_fmt (struct ui_out *uiout, int fldno, char *fldname,
|
|||||||
|
|
||||||
void
|
void
|
||||||
mi_table_begin (struct ui_out *uiout, int nbrofcols,
|
mi_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
|
int nr_rows,
|
||||||
const char *tblid)
|
const char *tblid)
|
||||||
{
|
{
|
||||||
struct ui_out_data *data = ui_out_data (uiout);
|
struct ui_out_data *data = ui_out_data (uiout);
|
||||||
|
14
gdb/ui-out.c
14
gdb/ui-out.c
@ -135,7 +135,7 @@ pop_level (struct ui_out *uiout,
|
|||||||
/* These are the default implementation functions */
|
/* These are the default implementation functions */
|
||||||
|
|
||||||
static void default_table_begin (struct ui_out *uiout, int nbrofcols,
|
static void default_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
const char *tblid);
|
int nr_rows, const char *tblid);
|
||||||
static void default_table_body (struct ui_out *uiout);
|
static void default_table_body (struct ui_out *uiout);
|
||||||
static void default_table_end (struct ui_out *uiout);
|
static void default_table_end (struct ui_out *uiout);
|
||||||
static void default_table_header (struct ui_out *uiout, int width,
|
static void default_table_header (struct ui_out *uiout, int width,
|
||||||
@ -209,7 +209,7 @@ struct ui_out *uiout = &def_uiout;
|
|||||||
/* These are the interfaces to implementation functions */
|
/* These are the interfaces to implementation functions */
|
||||||
|
|
||||||
static void uo_table_begin (struct ui_out *uiout, int nbrofcols,
|
static void uo_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
const char *tblid);
|
int nr_rows, const char *tblid);
|
||||||
static void uo_table_body (struct ui_out *uiout);
|
static void uo_table_body (struct ui_out *uiout);
|
||||||
static void uo_table_end (struct ui_out *uiout);
|
static void uo_table_end (struct ui_out *uiout);
|
||||||
static void uo_table_header (struct ui_out *uiout, int width,
|
static void uo_table_header (struct ui_out *uiout, int width,
|
||||||
@ -256,6 +256,7 @@ static void init_ui_out_state (struct ui_out *uiout);
|
|||||||
|
|
||||||
void
|
void
|
||||||
ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
|
ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
|
int nr_rows,
|
||||||
const char *tblid)
|
const char *tblid)
|
||||||
{
|
{
|
||||||
if (uiout->table_flag)
|
if (uiout->table_flag)
|
||||||
@ -271,7 +272,7 @@ previous table_end.");
|
|||||||
uiout->table_id = NULL;
|
uiout->table_id = NULL;
|
||||||
clear_header_list (uiout);
|
clear_header_list (uiout);
|
||||||
|
|
||||||
uo_table_begin (uiout, nbrofcols, uiout->table_id);
|
uo_table_begin (uiout, nbrofcols, nr_rows, uiout->table_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -710,7 +711,9 @@ gdb_query (struct ui_out *uiout, int qflags, char *qprompt)
|
|||||||
/* default gdb-out hook functions */
|
/* default gdb-out hook functions */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
default_table_begin (struct ui_out *uiout, int nbrofcols, const char *tblid)
|
default_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
|
int nr_rows,
|
||||||
|
const char *tblid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -808,11 +811,12 @@ default_flush (struct ui_out *uiout)
|
|||||||
|
|
||||||
void
|
void
|
||||||
uo_table_begin (struct ui_out *uiout, int nbrofcols,
|
uo_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
|
int nr_rows,
|
||||||
const char *tblid)
|
const char *tblid)
|
||||||
{
|
{
|
||||||
if (!uiout->impl->table_begin)
|
if (!uiout->impl->table_begin)
|
||||||
return;
|
return;
|
||||||
uiout->impl->table_begin (uiout, nbrofcols, tblid);
|
uiout->impl->table_begin (uiout, nbrofcols, nr_rows, tblid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
12
gdb/ui-out.h
12
gdb/ui-out.h
@ -84,12 +84,13 @@ extern struct cleanup *ui_out_begin_cleanup_end (struct ui_out *uiout,
|
|||||||
enum ui_out_type level_type,
|
enum ui_out_type level_type,
|
||||||
const char *id);
|
const char *id);
|
||||||
|
|
||||||
/* A table can be considered a special tuple/list combination with
|
/* A table can be considered a special tuple/list combination with the
|
||||||
the implied structure: ``table = { hdr = { header, ... } , body = [ {
|
implied structure: ``table = { hdr = { header, ... } , body = [ {
|
||||||
field, ... }, ... ] }'' */
|
field, ... }, ... ] }''. If NR_ROWS is negative then there is at
|
||||||
|
least one row. */
|
||||||
|
|
||||||
extern void ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
|
extern void ui_out_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||||
const char *tblid);
|
int nr_rows, const char *tblid);
|
||||||
|
|
||||||
extern void ui_out_table_header (struct ui_out *uiout, int width,
|
extern void ui_out_table_header (struct ui_out *uiout, int width,
|
||||||
enum ui_align align, const char *colhdr);
|
enum ui_align align, const char *colhdr);
|
||||||
@ -191,7 +192,8 @@ extern void gdb_query (struct ui_out *uiout, int qflags, char *qprompt);
|
|||||||
/* Type definition of all implementation functions. */
|
/* Type definition of all implementation functions. */
|
||||||
|
|
||||||
typedef void (table_begin_ftype) (struct ui_out * uiout,
|
typedef void (table_begin_ftype) (struct ui_out * uiout,
|
||||||
int nbrofcols, const char *tblid);
|
int nbrofcols, int nr_rows,
|
||||||
|
const char *tblid);
|
||||||
typedef void (table_body_ftype) (struct ui_out * uiout);
|
typedef void (table_body_ftype) (struct ui_out * uiout);
|
||||||
typedef void (table_end_ftype) (struct ui_out * uiout);
|
typedef void (table_end_ftype) (struct ui_out * uiout);
|
||||||
typedef void (table_header_ftype) (struct ui_out * uiout, int width,
|
typedef void (table_header_ftype) (struct ui_out * uiout, int width,
|
||||||
|
Reference in New Issue
Block a user