Binutils with MCST patches
Go to file
Simon Marchi 36d18bc526 Class-ify ui_out_table
This patch makes a class out of the ui_out_table structure, the
structure responsible for managing the generation of an UI table.

To simplify the ui_out_table object, I changed it so that it can only be
used for generating a single object.  Instead of clearing the header
list when starting a new table, we an ui_out_table when starting a
table and delete it when we're done.  Therefore, the checks:

  if (uiout->table->flag)
  if (!uiout->table->flag)

are respectively replaced with

  if (uiout->table != nullptr)
  if (uiout->table == nullptr)

Note: I removed the check at the beginning of ui_out_begin, because
there is an equivalent check at the beginning of verify_field.

New in v2:

  - use "enum class" for ui_out_table::state and update references.

gdb/ChangeLog:

	* ui-out.c (enum ui_out_table_state): Move to class
	ui_out_table as ui_out_table::state.
	(struct ui_out_table): Change to ...
	(class ui_out_table): ... this.
	<flag>: Remove.
	<entry_level>: Rename to ...
	<m_entry_level>: ... this.
	<columns>: Rename to ...
	<m_nr_cols>: ... this.
	<id>: Rename to ...
	<m_id>: ... this.
	<headers>: Rename to ...
	<m_headers>: ... this.
	<headers_iterator>: Rename to ...
	<m_headers_iterator>: ... this.
	<start_body, append_header, start_row, get_next_header,
	query_field, current_state, entry_level>: New methods.
	(struct ui_out) <table>: Change type to unique_ptr to
	ui_out_table.
	(append_header_to_list, get_next_header, clear_header_list,
	clear_table): Remove.
	(ui_out_table_begin): Instantiate ui_out_table object.  Update
	table check.
	(ui_out_table_body): Update table check, replace code with call
	to ui_out_table::start_body.
	(ui_out_table_end): Update table check, replace manual cleanup
	with assignment of uiout->table unique_ptr to nullptr.
	(ui_out_table_header): Update table check, replace call to
	append_header_to_list with call to append_header method.
	(ui_out_begin): Remove one table state check, update another.
	Replace code with call to start_row method.
	(verify_field): Update table checks.
	(ui_out_query_field): Update table check, replace code with call
	to query_field method.
	(ui_out_new): Remove table initialization code.
2016-12-01 16:20:35 -05:00
bfd Fix accesses to the GOT for AARCH64 operating in 32-bit mode. 2016-12-01 12:31:51 +00:00
binutils Fix calculation of synthetic symbol sizes (ppc64) 2016-12-01 08:42:11 -06:00
config
cpu
elfcpp
etc
gas Fix seg fault attempting to unget an EOF character. 2016-12-01 15:20:19 +00:00
gdb Class-ify ui_out_table 2016-12-01 16:20:35 -05:00
gold Fix internal error when relaxing branches to STT_SECTION symbols. 2016-12-01 12:53:54 -08:00
gprof Fix spelling in comments in C source files (gprof) 2016-11-27 15:04:01 +10:30
include [ARC] Add checking for LP_COUNT reg usage, improve error reporting. 2016-11-29 11:29:18 +01:00
intl
ld Fix generation of IDATA[6] for PE files. 2016-12-01 14:43:36 +00:00
libdecnumber
libiberty libiberty: Add Rust symbol demangling. 2016-11-18 11:06:18 +01:00
opcodes Fix abort in x86 disassembler. 2016-12-01 10:26:32 +00:00
readline
sim Fix typo in ChangeLog entry. 2016-12-01 09:07:55 -08:00
texinfo
zlib
.cvsignore
.gitattributes
.gitignore
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
ChangeLog Sync config.sub,config.guess with upstream. 2016-11-07 13:08:55 -08:00
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
README
README-maintainer-mode
compile
config-ml.in
config.guess Sync config.sub,config.guess with upstream. 2016-11-07 13:08:55 -08:00
config.rpath
config.sub Sync config.sub,config.guess with upstream. 2016-11-07 13:08:55 -08:00
configure
configure.ac
depcomp
djunpack.bat
install-sh
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
setup.com
src-release.sh
symlink-tree
ylwrap

README

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.