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.
This commit is contained in:
Vladimir Prus
2008-12-02 07:57:38 +00:00
parent f3c85de60a
commit 07e059b5a9
22 changed files with 1093 additions and 7 deletions

View File

@ -214,8 +214,11 @@ enum target_object
See "target-descriptions.c". ANNEX should never be empty. */
TARGET_OBJECT_AVAILABLE_FEATURES,
/* Currently loaded libraries, in XML format. */
TARGET_OBJECT_LIBRARIES
/* Possible future objects: TARGET_OBJECT_FILE, TARGET_OBJECT_PROC, ... */
TARGET_OBJECT_LIBRARIES,
/* Get OS specific data. The ANNEX specifies the type (running
processes, etc.). */
TARGET_OBJECT_OSDATA
/* Possible future objects: TARGET_OBJECT_FILE, ... */
};
/* Request that OPS transfer up to LEN 8-bit bytes of the target's
@ -1283,6 +1286,8 @@ extern int target_resize_to_sections (struct target_ops *target,
extern void remove_target_sections (bfd *abfd);
extern char *target_get_osdata (const char *type);
/* Stuff that should be shared among the various remote targets. */