Commit Graph

17 Commits

Author SHA1 Message Date
Joel Brobecker b811d2c292 Update copyright year range in all GDB files.
gdb/ChangeLog:

        Update copyright year range in all GDB files.
2020-01-01 10:20:53 +04:00
Joel Brobecker 42a4f53d2b Update copyright year range in all GDB files.
This commit applies all changes made after running the gdb/copyright.py
script.

Note that one file was flagged by the script, due to an invalid
copyright header
(gdb/unittests/basic_string_view/element_access/char/empty.cc).
As the file was copied from GCC's libstdc++-v3 testsuite, this commit
leaves this file untouched for the time being; a patch to fix the header
was sent to gcc-patches first.

gdb/ChangeLog:

	Update copyright year range in all GDB files.
2019-01-01 10:01:51 +04:00
Joel Brobecker e2882c8578 Update copyright year range in all GDB files
gdb/ChangeLog:

        Update copyright year range in all GDB files
2018-01-02 07:38:06 +04:00
Simon Marchi 479f8de1b3 C++ify osdata
This patch c++ifies the osdata structure: osdata_column, osdata_item and
osdata.  char* are replaced with std::string and VEC are replaced with
std::vector.  This allows to get rid of a great deal of cleanup and
free'ing code.

I replaced the splay tree in list_available_thread_groups with an
std::map.  Unless there's a good advantage to keep using a splay tree,
I think using the standard type should make things simpler to
understand.

gdb/ChangeLog:

	* osdata.h: Include vector isntead of vec.h.
	(osdata_column_s): Remove typedef.
	(struct osdata_column): Add constructor.
	<name, value>: Change type to std::string.
	(DEF_VEC_O (osdata_column_s)): Remove.
	(osdata_item_s): Remove typedef.
	(struct osdata_item) <columns>: Change type to std::vector.
	(DEF_VEC_O (osdata_item_s)): Remove.
	(struct osdata): Add constructor.
	<type>: Change type to std::string.
	<items>: Change type to std::vector.
	(osdata_p): Remove typedef.
	(DEF_VEC_P (osdata_p)): Remove.
	(osdata_parse): Return a unique_ptr.
	(osdata_free): Remove.
	(make_cleanup_osdata_free): Remove.
	(get_osdata): Return a unique_ptr.
	(get_osdata_column): Return pointer to std::string, take a
	reference to osdata_item as parameter.
	* osdata.c (struct osdata_parsing_data) <osdata>: Change type to
	unique_ptr.
	<property_name>: Change type to std::string.
	(osdata_start_osdata): Allocate osdata with new and adjust.
	(osdata_start_item): Adjust.
	(osdata_start_column): Adjust.
	(osdata_end_column): Adjust.
	(clear_parsing_data): Remove.
	(osdata_parse): Return a unique_ptr and adjust, remove cleanup.
	(osdata_item_clear): Remove.
	(get_osdata): return a unique_ptr and adjust.
	(get_osdata_column): Return a pointer to std::string and adjust.
	(info_osdata): Adjust.
	* mi/mi-main.c: Include <map>.
	(free_vector_of_osdata_items): Remove.
	(list_available_thread_groups): Adjust, use std::map instead of
	splay tree.
2017-11-22 16:12:06 -05:00
Pedro Alves fdf9e36fa2 -Wwrite-strings: MI -info-os
-Wwrite-strings flags this attempt to convert a string literal to
 "char *":

      info_osdata_command ("", 0);

info_osdata_command is a command function.  We could address this by
simply passing NULL instead of "".  However, I went a little bit
further and added a new function that is called by both the CLI and
MI.

gdb/ChangeLog:
2017-04-05  Pedro Alves  <palves@redhat.com>

	* mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
	info_osdata_command.
	* osdata.c (info_osdata_command): Rename to ...
	(info_osdata): ... this.  Constify 'type' parameter, and remove
	the 'from_tty' parameter.  Accept NULL TYPE.
	(info_osdata_command): New function.
	* osdata.h (info_osdata_command): Remove declaration.
	(info_osdata): New declaration.
2017-04-05 19:21:35 +01:00
Joel Brobecker 61baf725ec update copyright year range in GDB files
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.

gdb/ChangeLog:

        Update copyright year range in all GDB files.
2017-01-01 10:52:34 +04:00
Joel Brobecker 618f726fcb GDB copyright headers update after running GDB's copyright.py script.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2016-01-01 08:43:22 +04:00
Joel Brobecker 32d0add0a6 Update year range in copyright notice of all files owned by the GDB project.
gdb/ChangeLog:

        Update year range in copyright notice of all files.
2015-01-01 13:32:14 +04:00
Joel Brobecker ecd75fc8ee Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
Joel Brobecker 28e7fd6234 Update years in copyright notice for the GDB files.
Two modifications:
  1. The addition of 2013 to the copyright year range for every file;
  2. The use of a single year range, instead of potentially multiple
     year ranges, as approved by the FSF.
2013-01-01 06:33:28 +00:00
Stan Shebs f3e0e9604d 2012-05-23 Stan Shebs <stan@codesourcery.com>
Kwok Cheung Yeung  <kcy@codesourcery.com>

	* Makefile.in (SUBDIR_MI_OBS): Add mi-cmd-info.o.
	(SUBDIR_MI_SRCS): Add mi-cmd-info.c.
	(mi-cmd-info.o): New rule.
	* osdata.h (info_osdata_command): New declaration.
	* osdata.c (info_osdata_command): Change to non-static.
	* mi/mi-cmds.h (mi_cmd_info_os): New declaration.
	* mi/mi-cmds.c (mi_cmds): Add -info-os MI command.
	* mi/mi-cmd-info.c: New file.

	* gdb.texinfo (Miscellaneous GDB/MI Commands): Document -info-os.

	* gdb.mi/mi-info-os.exp: New file.
2012-05-24 00:33:47 +00:00
Joel Brobecker 0b30217134 Copyright year update in most files of the GDB Project.
gdb/ChangeLog:

        Copyright year update in most files of the GDB Project.
2012-01-04 08:17:56 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Pedro Alves e0665bc852 * target.h (target_get_osdata): Describe.
* osdata.h (make_cleanup_osdata_free): Declare.
	* osdata.c (osdata_item_clear): Define even if HAVE_LIBEXPAT is
	not defined.
	(osdata_free_cleanup): New.
	(make_cleanup_osdata_free): New.
	(get_osdata): Fix leak.
	(info_osdata_command): Use make_cleanup_osdata_free.
	(info_processes_command): Delete.
	(_initialize_osdata): Drop undocumented "info processes" alias.
	* mi/mi-main.c (mi_cmd_list_thread_groups): Fix leak.
2008-12-02 15:52:15 +00:00
Vladimir Prus 07e059b5a9 Implement -list-thread-groups --available
* Makefile.in (XMLFILES): Add osdata.dtd.
        (SFILES): Add osdata.c.
        (COMMON_OBS): Add osdata.o.
        * linux-nat.c: Include pwd.h, sys/types.h, gdb_dirent.h and xml-support.h.
        (linux_nat_xfer_osdata): New function.
        (linux_xfer_partial): Handle TARGET_OBJECT_OSDATA.
        * osdata.c: New file.
        * osdata.h: New file.
        * remote.c (PACKET_qXfer_osdata): New packet enum.
        (remote_protocol_features): Add "qXfer:osdata:read".
        (remote_read_qxfer): Handle TARGET_OBJECT_OSDATA.
        (extended_remote_can_run): New.
        (init_extended_remote_ops): Set to_can_run to
        extended_remote_can_run.
        (_initialize_remote): Add packet config command for
        "qXfer:osdata:read".
        * xml-support.c (obstack_xml_printf): New function.
        * xml-support.h (obstack_xml_printf): Declare.
        * target.c (target_get_osdata): New function.
        * target.h (enum target_object): Add TARGET_OBJECT_OSDATA.
        (target_os_data): Declare.
        * features/osdata.dtd: New file.
        * mi/mi-main.c (mi_list_thread_groups): Handle the --available
        option.
2008-12-02 07:57:38 +00:00