public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-tromey-python: Merge remote-tracking branch 'gdb/master' into archer-tromey-python
Date: Fri, 22 Jul 2011 16:46:00 -0000	[thread overview]
Message-ID: <20110722164603.13546.qmail@sourceware.org> (raw)

The branch, archer-tromey-python has been updated
       via  b9ce488bac1b8ee3135bdd05a0bfd48cde9706d9 (commit)
       via  25993ce40950a8b34b31efd49790a16be3d5c519 (commit)
       via  a9b3da94bae50d88a10d3158d7360e1545ccb8a7 (commit)
       via  b002038111ddbace065011955f98fe50e8d0e794 (commit)
       via  7b0ba7e2d409d1864af5b32aa904895b1b0813d4 (commit)
       via  a007d94a6a9ecfce3be7c7c08026aec697f08538 (commit)
       via  6e94ab2c3817f387d1b1621ad36575c710c09d6d (commit)
       via  87b5e086787b4a5396a303dd2e82fd9163edd8a4 (commit)
       via  712d52906e7877548df480f231f1ba45f2823d48 (commit)
       via  b722ec47091f14953af30fcb159aac1bfb50e87f (commit)
       via  fdc07668d3f537cb1c77f96d1cb1c0ca5769a964 (commit)
       via  6ca636601466311802dfbc339485c16fab5bc77b (commit)
       via  ab80d2f364824d136e19c3161523b2308db1760d (commit)
       via  2adf90077dec6c3dcb421383b45eadbc59230949 (commit)
      from  53246cde132053e86526163a1d86d0ebf57f3b67 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit b9ce488bac1b8ee3135bdd05a0bfd48cde9706d9
Merge: 53246cd 25993ce
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Jul 22 18:45:41 2011 +0200

    Merge remote-tracking branch 'gdb/master' into archer-tromey-python
    
    Conflicts:
    	gdb/python/python.c

commit 25993ce40950a8b34b31efd49790a16be3d5c519
Author: Tom Tromey <tromey@redhat.com>
Date:   Fri Jul 22 15:31:48 2011 +0000

    gdb
    	* amd64-tdep.c (amd64_pseudo_register_read_value): Rename
    	from amd64_pseudo_register_read.  Change arguments.  Call
    	mark_value_bytes_unavailable when needed.
    	(amd64_init_abi): Use set_gdbarch_pseudo_register_read_value, not
    	set_gdbarch_pseudo_register_read.
    	* sentinel-frame.c (sentinel_frame_prev_register): Use
    	regcache_cooked_read_value.
    	* regcache.h (regcache_cooked_read_value): Declare.
    	* regcache.c (regcache_cooked_read_value): New function.
    	(regcache_cooked_read): Call
    	gdbarch_pseudo_register_read_value if available.
    	* i386-tdep.h (i386_pseudo_register_read_value): Declare.
    	(i386_pseudo_register_read): Remove.
    	* i386-tdep.c (i386_pseudo_register_read_into_value): Rename from
    	i386_pseudo_register_read.  Change arguments.  Call
    	mark_value_bytes_unavailable when needed.
    	(i386_pseudo_register_read_value): New function.
    	(i386_gdbarch_init): Call set_gdbarch_pseudo_register_read_value,
    	not set_gdbarch_pseudo_register_read.
    	* gdbarch.sh (pseudo_register_read_value): New method.
    	* gdbarch.c, gdbarch.h: Rebuild.
    	* findvar.c (value_from_register): Call get_frame_register_value.
    gdb/testsuite
    	* gdb.dwarf2/typeddwarf.c: XFAIL 'z' on x86-64.
    	* gdb.dwarf2/typeddwarf.exp (xfail-gdb-test): Add arch_pattern
    	argument.
    	* gdb.dwarf2/typeddwarf-amd64.S: New file.

commit a9b3da94bae50d88a10d3158d7360e1545ccb8a7
Author: DJ Delorie <dj@delorie.com>
Date:   Fri Jul 22 14:37:50 2011 +0000

    merge from gcc

commit b002038111ddbace065011955f98fe50e8d0e794
Author: pmuldoon <pmuldoon>
Date:   Fri Jul 22 09:22:49 2011 +0000

    2011-07-22  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* event-top.c (cli_command_loop): Use get_prompt, get_suffix,
    	get_prefix.
    	(display_gdb_prompt): Likewise.
    	(change_annotation_level): Likewise.
    	(push_prompt): Likewise.
    	(pop_prompt): Likewise.
    	(handle_stop_sig): Use get_prompt with a level.
    	* top.c (command_loop): Use get_prompt with a level.
    	(set_async_annotation_level): Use set_prompt with a level.
    	(get_prefix): New function.
    	(set_prefix): Ditto.
    	(set_suffix): Ditto.
    	(get_suffix): Ditto.
    	(get_prompt): Accept a level argument.
    	(set_prompt): Accept a level argument.  Free old prompts.  Set
    	new_async_prompt if level is 0.
    	(init_main): Use set_prompt with a level.  Do not set
    	new_async_prompt.
    	* event-top.h (PROMPT, SUFFIX, PREFIX): Move to top.c
    	* top.h: Declare set_suffix, get_suffix, set_prefix, get_prefix.
    	Modify set_prompt, get_prompt to account for levels.
    	* tui/tui-interp.c (tui_command_loop): Use get_prompt with a
    	level
    	* python/python.c (before_prompt_hook): Use set_prompt.

commit 7b0ba7e2d409d1864af5b32aa904895b1b0813d4
Author: ratmice <ratmice>
Date:   Fri Jul 22 01:05:24 2011 +0000

    * gdb.threads/Makefile.in: Avoid globbing corethreads.exp
    in mostlyclean rule.  Add files ending in .core.

commit a007d94a6a9ecfce3be7c7c08026aec697f08538
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Fri Jul 22 00:00:05 2011 +0000

    daily update

commit 6e94ab2c3817f387d1b1621ad36575c710c09d6d
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Fri Jul 22 00:00:02 2011 +0000

    *** empty log message ***

commit 87b5e086787b4a5396a303dd2e82fd9163edd8a4
Author: kcy <kcy>
Date:   Thu Jul 21 23:46:07 2011 +0000

    2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
    
    gdb/
    	* defs.h: Add guard against inclusion in gdbserver.
    	(struct ptid, ptid_t): Move to common/ptid.h.
    	(xfree, xzalloc, xasprintf, xvasprintf, xstrprintf, xstrvprintf,
    	xsnprintf, internal_error): Move to common/common-utils.h.
    	(nomem): Delete.
    	* gdb_assert.h: Move into common/ sub-directory.
    	* gdb_locale.h: Ditto.
    	* gdb_dirent.h: Ditto.
    	* inferior.h (minus_one_ptid, null_ptid, ptid_build, pid_to_ptid,
    	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid):
    	Move into common/ptid.h.
    	* xml-support.c (xml_escape_text): Move into common/xml-utils.c.
    	(gdb_xml_create_parser_and_cleanup_1, xml_fetch_context_from_file):
    	Change nomem to malloc_failure.
    	* xml-support.h (xml_escape_text): Move into common/xml-utils.h.
    	* utils.c (nomem): Rename to malloc_failure.
    	(xmalloc, xzalloc, xrealloc, xcalloc, xfree, xstrprintf, xasprintf,
    	xvasprintf, xstrvprintf, xsnprintf): Move to common/common-utils.c.
    	(gdb_buildargv): Change nomem to malloc_failure.
    	* infrun.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
    	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
    	ptid_is_pid): Move into common/ptid.c.
    	(initialize_infrun): Delete initialization of null_ptid and
    	minus_one_ptid.
    	* linux-nat.c (linux_nat_xfer_osdata): Defer to
    	linux_common_xfer_osdata.
    	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
    	common/ptid.c and common/buffer.c.
    	(HFILES_NO_SRCDIR): Add common/common-utils.h, common/xml-utils.h,
    	common/ptid.h, common/buffer.h and common/linux-osdata.h.
    	(COMMON_OBS): Add xml-utils.o, common-utils.o, buffer.o and ptid.o.
    	(common-utils.o, xml-utils.o, ptid.o, buffer.o, linux-osdata.o): New
    	rules.
    	* common/gdb_assert.h: New.
    	* common/gdb_dirent.h: New.
    	* common/gdb_locale.h: New.
    	* common/buffer.c: New.
    	* common/buffer.h: New.
    	* common/ptid.c: New.
    	* common/ptid.h: New.
    	* common/xml-utils.c: New.
    	* common/xml-utils.h: New.
    	* common/common-utils.c: New.
    	* common/common-utils.h: New.
    	* common/linux-osdata.c: New.
    	* common/linux-osdata.h: New.
    	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-osdata.o.
    	* config/arm/linux.mh (NATDEPFILES): Ditto.
    	* config/i386/linux.mh (NATDEPFILES): Ditto.
    	* config/i386/linux64.mh (NATDEPFILES): Ditto.
    	* config/ia64/linux.mh (NATDEPFILES): Ditto.
    	* config/m32r/linux.mh (NATDEPFILES): Ditto.
    	* config/m68k/linux.mh (NATDEPFILES): Ditto.
    	* config/mips/linux.mh (NATDEPFILES): Ditto.
    	* config/pa/linux.mh (NATDEPFILES): Ditto.
    	* config/powerpc/linux.mh (NATDEPFILES): Ditto.
    	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
    	* config/s390/s390.mh (NATDEPFILES): Ditto.
    	* config/sparc/linux.mh (NATDEPFILES): Ditto.
    	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
    	* config/xtensa/linux.mh (NATDEPFILES): Ditto.
    
    gdbserver/
    	* linux-low.c (compare_ints, unique, list_threads, show_process,
    	linux_core_of_thread): Delete.
    	(linux_target_ops): Change linux_core_of_thread to
    	linux_common_core_of_thread.
    	(linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
    	* utils.c (malloc_failure): Change type of argument.
    	(xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
    	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
    	common/linux-osdata.c, common/ptid.c and common/buffer.c.
    	(OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
    	(IPA_OBJS): Add common-utils-ipa.o.
    	(ptid_h, linux_osdata_h): New macros.
    	(server_h): Add common/common-utils.h, common/xml-utils.h,
    	common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
    	common/ptid.h.
    	(common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
    	ptid.o, buffer.o): New rules.
    	(linux-low.o): Add common/linux-osdata.h as a dependency.
    	* configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
    	* configure.ac: Add AC_HEADER_DIRENT check.
    	* config.in: Regenerate.
    	* configure: Regenerate.
    	* remote-utils.c (xml_escape_text): Delete.
    	(buffer_grow, buffer_free, buffer_init, buffer_finish,
    	buffer_xml_printf): Move to common/buffer.c.
    	* server.c (main): Remove call to initialize_inferiors.
    	* server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
    	ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
    	ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
    	internal_error, gdb_assert, gdb_assert_fail): Delete.
    	(struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
    	buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
    	common/buffer.h.
    	* inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
    	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
    	initialize_inferiors): Delete.

commit 712d52906e7877548df480f231f1ba45f2823d48
Author: ratmice <ratmice>
Date:   Thu Jul 21 17:23:53 2011 +0000

    * NEWS: Add info macros and info definitions commands.

commit b722ec47091f14953af30fcb159aac1bfb50e87f
Author: pmuldoon <pmuldoon>
Date:   Thu Jul 21 15:58:50 2011 +0000

     2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* NEWS: Document Python prompt substitution hook.

commit fdc07668d3f537cb1c77f96d1cb1c0ca5769a964
Author: ratmice <ratmice>
Date:   Thu Jul 21 15:13:26 2011 +0000

    PR macros/12999
    * macrotab.h (macro_callback_fn): Add new arguments to callback.
    * macrotab.c (foreach_macro): Ditto.
    (foreach_macro_in_scope): Ditto.
    * macrocmd.c (print_macro_callback): New function.
    (info_macro_command): Move some code to print_macro_definition.
    (print_macro_definition): New function.
    (print_one_macro): Add new arguments to callback.
    
    testsuite/
    * gdb.base/info-macros.c: New test sources.
    * gdb.base/info-macros.exp: New tests.
    
    docs/
    * gdb.texinfo (Macros): Add info definitions and info macros commands.
    Update text and cindex entries for info macro command.

commit 6ca636601466311802dfbc339485c16fab5bc77b
Author: pmuldoon <pmuldoon>
Date:   Thu Jul 21 11:03:43 2011 +0000

    2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>
                Tom Tromey  <tromey@redhat.com>
    
    	* top.c (set_prompt): Rewrite to free previous prompt, free
    	asynch_new_prompt and set both on new prompts.
    	* event-top.c (display_gdb_prompt): Add prompt substitution
    	logic.
    	* python/python.c (before_prompt_hook): New function.
    
    2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* gdb.python/python.exp: Add prompt substitution tests.
    
    2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>
    
    	* observer.texi (GDB Observers): Add before_prompt observer.
    	* gdb.texinfo (Basic Python): Add documentation for prompt
    	substitution.

commit ab80d2f364824d136e19c3161523b2308db1760d
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Thu Jul 21 00:00:33 2011 +0000

    *** empty log message ***

commit 2adf90077dec6c3dcb421383b45eadbc59230949
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 21 00:00:05 2011 +0000

    daily update

-----------------------------------------------------------------------

Summary of changes:
 bfd/version.h                               |    2 +-
 gdb/ChangeLog                               |  148 +++
 gdb/Makefile.in                             |   34 +-
 gdb/NEWS                                    |   15 +-
 gdb/amd64-tdep.c                            |   37 +-
 gdb/common/buffer.c                         |  144 +++
 gdb/common/buffer.h                         |   63 ++
 gdb/common/common-utils.c                   |  170 +++
 gdb/common/common-utils.h                   |   59 +
 gdb/{ => common}/gdb_assert.h               |    0
 gdb/{ => common}/gdb_dirent.h               |    0
 gdb/{ => common}/gdb_locale.h               |    0
 gdb/common/linux-osdata.c                   |  586 ++++++++++
 gdb/{gdb_dirent.h => common/linux-osdata.h} |   36 +-
 gdb/common/ptid.c                           |   94 ++
 gdb/common/ptid.h                           |   87 ++
 gdb/common/xml-utils.c                      |   91 ++
 gdb/{gdb_dirent.h => common/xml-utils.h}    |   34 +-
 gdb/config/alpha/alpha-linux.mh             |    2 +-
 gdb/config/arm/linux.mh                     |    3 +-
 gdb/config/i386/linux.mh                    |    2 +-
 gdb/config/i386/linux64.mh                  |    3 +-
 gdb/config/ia64/linux.mh                    |    3 +-
 gdb/config/m32r/linux.mh                    |    2 +-
 gdb/config/m68k/linux.mh                    |    3 +-
 gdb/config/mips/linux.mh                    |    2 +-
 gdb/config/pa/linux.mh                      |    4 +-
 gdb/config/powerpc/linux.mh                 |    2 +-
 gdb/config/powerpc/ppc64-linux.mh           |    2 +-
 gdb/config/s390/s390.mh                     |    3 +-
 gdb/config/sparc/linux.mh                   |    2 +-
 gdb/config/sparc/linux64.mh                 |    2 +-
 gdb/config/xtensa/linux.mh                  |    3 +-
 gdb/defs.h                                  |   70 +--
 gdb/doc/ChangeLog                           |   12 +
 gdb/doc/gdb.texinfo                         |   33 +-
 gdb/doc/observer.texi                       |    5 +
 gdb/event-top.c                             |  107 ++-
 gdb/event-top.h                             |    3 -
 gdb/findvar.c                               |   24 +-
 gdb/gdbarch.c                               |   33 +
 gdb/gdbarch.h                               |   11 +
 gdb/gdbarch.sh                              |    5 +
 gdb/gdbserver/ChangeLog                     |   39 +
 gdb/gdbserver/Makefile.in                   |   35 +-
 gdb/gdbserver/config.in                     |   15 +
 gdb/gdbserver/configure                     |  159 +++
 gdb/gdbserver/configure.ac                  |    1 +
 gdb/gdbserver/configure.srv                 |   32 +-
 gdb/gdbserver/inferiors.c                   |   82 --
 gdb/gdbserver/linux-low.c                   |  316 +------
 gdb/gdbserver/remote-utils.c                |  164 ---
 gdb/gdbserver/server.c                      |    1 -
 gdb/gdbserver/server.h                      |  136 +---
 gdb/gdbserver/utils.c                       |   77 +--
 gdb/i386-tdep.c                             |   59 +-
 gdb/i386-tdep.h                             |    9 +-
 gdb/inferior.h                              |   32 +-
 gdb/infrun.c                                |   73 --
 gdb/linux-nat.c                             |  142 +---
 gdb/macrocmd.c                              |  133 ++-
 gdb/macrotab.c                              |    6 +-
 gdb/macrotab.h                              |    9 +-
 gdb/python/python.c                         |   80 ++
 gdb/regcache.c                              |   55 +
 gdb/regcache.h                              |    6 +
 gdb/sentinel-frame.c                        |   15 +-
 gdb/symtab.c                                |    1 +
 gdb/testsuite/ChangeLog                     |   22 +
 gdb/testsuite/gdb.base/info-macros.c        |   73 ++
 gdb/testsuite/gdb.base/info-macros.exp      |  202 ++++
 gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S | 1568 +++++++++++++++++++++++++++
 gdb/testsuite/gdb.dwarf2/typeddwarf.c       |    2 +-
 gdb/testsuite/gdb.dwarf2/typeddwarf.exp     |   23 +-
 gdb/testsuite/gdb.python/python.exp         |   82 ++
 gdb/testsuite/gdb.threads/Makefile.in       |    3 +-
 gdb/top.c                                   |  107 ++-
 gdb/top.h                                   |   20 +-
 gdb/tui/tui-interp.c                        |   10 +-
 gdb/utils.c                                 |  146 +---
 gdb/version.in                              |    2 +-
 gdb/xml-support.c                           |   66 +--
 gdb/xml-support.h                           |    6 +-
 include/ChangeLog                           |   28 +
 include/libiberty.h                         |    5 +-
 libiberty/ChangeLog                         |   12 +
 libiberty/Makefile.in                       |   19 +-
 libiberty/config.in                         |    6 +
 libiberty/configure                         |   12 +-
 libiberty/configure.ac                      |   12 +-
 libiberty/stack-limit.c                     |   59 +
 91 files changed, 4553 insertions(+), 1550 deletions(-)
 create mode 100644 gdb/common/buffer.c
 create mode 100644 gdb/common/buffer.h
 create mode 100644 gdb/common/common-utils.c
 create mode 100644 gdb/common/common-utils.h
 rename gdb/{ => common}/gdb_assert.h (100%)
 copy gdb/{ => common}/gdb_dirent.h (100%)
 rename gdb/{ => common}/gdb_locale.h (100%)
 create mode 100644 gdb/common/linux-osdata.c
 copy gdb/{gdb_dirent.h => common/linux-osdata.h} (51%)
 create mode 100644 gdb/common/ptid.c
 create mode 100644 gdb/common/ptid.h
 create mode 100644 gdb/common/xml-utils.c
 rename gdb/{gdb_dirent.h => common/xml-utils.h} (53%)
 create mode 100644 gdb/testsuite/gdb.base/info-macros.c
 create mode 100644 gdb/testsuite/gdb.base/info-macros.exp
 create mode 100644 gdb/testsuite/gdb.dwarf2/typeddwarf-amd64.S
 create mode 100644 libiberty/stack-limit.c

First 500 lines of diff:
diff --git a/bfd/version.h b/bfd/version.h
index bb223a4..c262ff7 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20110720
+#define BFD_VERSION_DATE 20110722
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5e4ab8c..37214d3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,151 @@
+2011-07-22  Tom Tromey  <tromey@redhat.com>
+
+	* amd64-tdep.c (amd64_pseudo_register_read_value): Rename
+	from amd64_pseudo_register_read.  Change arguments.  Call
+	mark_value_bytes_unavailable when needed.
+	(amd64_init_abi): Use set_gdbarch_pseudo_register_read_value, not
+	set_gdbarch_pseudo_register_read.
+	* sentinel-frame.c (sentinel_frame_prev_register): Use
+	regcache_cooked_read_value.
+	* regcache.h (regcache_cooked_read_value): Declare.
+	* regcache.c (regcache_cooked_read_value): New function.
+	(regcache_cooked_read): Call
+	gdbarch_pseudo_register_read_value if available.
+	* i386-tdep.h (i386_pseudo_register_read_value): Declare.
+	(i386_pseudo_register_read): Remove.
+	* i386-tdep.c (i386_pseudo_register_read_into_value): Rename from
+	i386_pseudo_register_read.  Change arguments.  Call
+	mark_value_bytes_unavailable when needed.
+	(i386_pseudo_register_read_value): New function.
+	(i386_gdbarch_init): Call set_gdbarch_pseudo_register_read_value,
+	not set_gdbarch_pseudo_register_read.
+	* gdbarch.sh (pseudo_register_read_value): New method.
+	* gdbarch.c, gdbarch.h: Rebuild.
+	* findvar.c (value_from_register): Call get_frame_register_value.
+
+2011-07-22  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* event-top.c (cli_command_loop): Use get_prompt, get_suffix,
+	get_prefix.
+	(display_gdb_prompt): Likewise.
+	(change_annotation_level): Likewise.
+	(push_prompt): Likewise.
+	(pop_prompt): Likewise.
+	(handle_stop_sig): Use get_prompt with a level.
+	* top.c (command_loop): Use get_prompt with a level.
+	(set_async_annotation_level): Use set_prompt with a level.
+	(get_prefix): New function.
+	(set_prefix): Ditto.
+	(set_suffix): Ditto.
+	(get_suffix): Ditto.
+	(get_prompt): Accept a level argument.
+	(set_prompt): Accept a level argument.  Free old prompts.  Set
+	new_async_prompt if level is 0.
+	(init_main): Use set_prompt with a level.  Do not set
+	new_async_prompt.
+	* event-top.h (PROMPT, SUFFIX, PREFIX): Move to top.c
+	* top.h: Declare set_suffix, get_suffix, set_prefix, get_prefix.
+	Modify set_prompt, get_prompt to account for levels.
+	* tui/tui-interp.c (tui_command_loop): Use get_prompt with a
+	level.
+	* python/python.c (before_prompt_hook): Use set_prompt.
+	
+2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+	* defs.h: Add guard against inclusion in gdbserver.
+	(struct ptid, ptid_t): Move to common/ptid.h.
+	(xfree, xzalloc, xasprintf, xvasprintf, xstrprintf, xstrvprintf,
+	xsnprintf, internal_error): Move to common/common-utils.h.
+	(nomem): Delete.
+	* gdb_assert.h: Move into common/ sub-directory.
+	* gdb_locale.h: Ditto.
+	* gdb_dirent.h: Ditto.
+	* inferior.h (minus_one_ptid, null_ptid, ptid_build, pid_to_ptid,
+	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid):
+	Move into common/ptid.h.
+	* xml-support.c (xml_escape_text): Move into common/xml-utils.c.
+	(gdb_xml_create_parser_and_cleanup_1, xml_fetch_context_from_file):
+	Change nomem to malloc_failure.
+	* xml-support.h (xml_escape_text): Move into common/xml-utils.h.
+	* utils.c (nomem): Rename to malloc_failure.
+	(xmalloc, xzalloc, xrealloc, xcalloc, xfree, xstrprintf, xasprintf,
+	xvasprintf, xstrvprintf, xsnprintf): Move to common/common-utils.c.
+	(gdb_buildargv): Change nomem to malloc_failure.
+	* infrun.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
+	ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
+	ptid_is_pid): Move into common/ptid.c.
+	(initialize_infrun): Delete initialization of null_ptid and
+	minus_one_ptid.
+	* linux-nat.c (linux_nat_xfer_osdata): Defer to
+	linux_common_xfer_osdata.
+	* Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
+	common/ptid.c and common/buffer.c.
+	(HFILES_NO_SRCDIR): Add common/common-utils.h, common/xml-utils.h,
+	common/ptid.h, common/buffer.h and common/linux-osdata.h.
+	(COMMON_OBS): Add xml-utils.o, common-utils.o, buffer.o and ptid.o.
+	(common-utils.o, xml-utils.o, ptid.o, buffer.o, linux-osdata.o): New
+	rules.
+	* common/gdb_assert.h: New.
+	* common/gdb_dirent.h: New.
+	* common/gdb_locale.h: New.
+	* common/buffer.c: New.
+	* common/buffer.h: New.
+	* common/ptid.c: New.
+	* common/ptid.h: New.
+	* common/xml-utils.c: New.
+	* common/xml-utils.h: New.
+	* common/common-utils.c: New.
+	* common/common-utils.h: New.
+	* common/linux-osdata.c: New.
+	* common/linux-osdata.h: New.
+	* config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-osdata.o.
+	* config/arm/linux.mh (NATDEPFILES): Ditto.
+	* config/i386/linux.mh (NATDEPFILES): Ditto.
+	* config/i386/linux64.mh (NATDEPFILES): Ditto.
+	* config/ia64/linux.mh (NATDEPFILES): Ditto.
+	* config/m32r/linux.mh (NATDEPFILES): Ditto.
+	* config/m68k/linux.mh (NATDEPFILES): Ditto.
+	* config/mips/linux.mh (NATDEPFILES): Ditto.
+	* config/pa/linux.mh (NATDEPFILES): Ditto.
+	* config/powerpc/linux.mh (NATDEPFILES): Ditto.
+	* config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
+	* config/s390/s390.mh (NATDEPFILES): Ditto.
+	* config/sparc/linux.mh (NATDEPFILES): Ditto.
+	* config/sparc/linux64.mh (NATDEPFILES): Ditto.
+	* config/xtensa/linux.mh (NATDEPFILES): Ditto.
+
+2011-07-21  Matt Rice  <ratmice@gmail.com>
+
+	* NEWS: Add info macros and info definitions commands.
+
+2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>
+
+	* NEWS: Document Python prompt substitution hook.
+
+2011-07-18  Matt Rice  <ratmice@gmail.com>
+
+	PR macros/12999
+	* macrotab.h (macro_callback_fn): Add new arguments to callback.
+	* macrotab.c (foreach_macro): Ditto.
+	(foreach_macro_in_scope): Ditto.
+	* macrocmd.c (print_macro_callback): New function.
+	(info_macro_command): Move some code to print_macro_definition.
+	(print_macro_definition): New function.
+	(print_one_macro): Add new arguments to callback.
+	(info_definitions_command): New function.
+	(info_macros_command): Ditto.
+	(_initialize_macrocmd): Add info macros and info definitions commands.
+	* symtab.c (add_macro_name): Add new arguments to callback.
+
+2011-07-21  Phil Muldoon  <pmuldoon@redhat.com>
+            Tom Tromey  <tromey@redhat.com>
+
+	* top.c (set_prompt): Rewrite to free previous prompt, free
+	asynch_new_prompt and set both on new prompts.
+	* event-top.c (display_gdb_prompt): Add prompt substitution
+	logic.
+	* python/python.c (before_prompt_hook): New function.
+
 2011-07-20  Matt Rice  <ratmice@gmail.com>
 
 	* bfin-tdep.c (bfin_extract_return_value): Fix swapped
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 633e637..8173dfd 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -737,7 +737,9 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
 	jit.c \
 	xml-syscall.c \
 	annotate.c common/signals.c copying.c dfp.c gdb.c inf-child.c \
-	regset.c sol-thread.c windows-termcap.c
+	regset.c sol-thread.c windows-termcap.c \
+	common/common-utils.c common/xml-utils.c \
+	common/ptid.c common/buffer.c
 
 LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
 
@@ -816,7 +818,9 @@ osdata.h procfs.h python/py-event.h python/py-events.h python/py-stopevent.h \
 python/python-internal.h python/python.h ravenscar-thread.h record.h \
 solib-darwin.h solib-ia64-hpux.h solib-spu.h windows-nat.h xcoffread.h \
 gnulib/extra/arg-nonnull.h gnulib/extra/c++defs.h gnulib/extra/warn-on-use.h \
-gnulib/stddef.in.h inline-frame.h
+gnulib/stddef.in.h inline-frame.h \
+common/common-utils.h common/xml-utils.h common/buffer.h common/ptid.h \
+common/linux-osdata.h
 
 # Header files that already have srcdir in them, or which are in objdir.
 
@@ -898,10 +902,12 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
 	trad-frame.o \
 	tramp-frame.o \
 	solib.o solib-target.o \
-	prologue-value.o memory-map.o memrange.o xml-support.o xml-syscall.o \
+	prologue-value.o memory-map.o memrange.o \
+	xml-support.o xml-syscall.o xml-utils.o \
 	target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
 	inferior.o osdata.o gdb_usleep.o record.o gcore.o \
-	jit.o progspace.o
+	jit.o progspace.o \
+	common-utils.o buffer.o ptid.o
 
 TSOBS = inflow.o
 
@@ -1939,6 +1945,26 @@ signals.o: $(srcdir)/common/signals.c
 	$(COMPILE) $(srcdir)/common/signals.c
 	$(POSTCOMPILE)
 
+common-utils.o: ${srcdir}/common/common-utils.c
+	$(COMPILE) $(srcdir)/common/common-utils.c
+	$(POSTCOMPILE)
+
+xml-utils.o: ${srcdir}/common/xml-utils.c
+	$(COMPILE) $(srcdir)/common/xml-utils.c
+	$(POSTCOMPILE)
+
+ptid.o: ${srcdir}/common/ptid.c
+	$(COMPILE) $(srcdir)/common/ptid.c
+	$(POSTCOMPILE)
+
+buffer.o: ${srcdir}/common/buffer.c
+	$(COMPILE) $(srcdir)/common/buffer.c
+	$(POSTCOMPILE)
+
+linux-osdata.o: ${srcdir}/common/linux-osdata.c
+	$(COMPILE) $(srcdir)/common/linux-osdata.c
+	$(POSTCOMPILE)
+
 #
 # gdb/tui/ dependencies
 #
diff --git a/gdb/NEWS b/gdb/NEWS
index 22d5a9c..263b70b 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,10 +3,15 @@
 
 *** Changes since GDB 7.3
 
-* The "maint set python print-stack on|off" command has been
-  deprecated, and a new command: "set python print-stack on|off" has
-  replaced it.  Additionally, the default for "print-stack" is now
-  "off".
+* Python scripting
+
+  ** The "maint set python print-stack on|off" command has been
+     deprecated, and a new command: "set python print-stack on|off" has
+     replaced it.  Additionally, the default for "print-stack" is now
+     "off".
+   
+  ** A prompt subsitution hook (prompt_hook) is now available to the
+     Python API.
 
 * libthread-db-search-path now supports two special values: $sdir and $pdir.
   $sdir specifies the default system locations of shared libraries.
@@ -40,6 +45,8 @@
   the first connection is made.  The listening port used by GDBserver will
   become available after that.
 
+* New commands "info macros", and "info definitions" have been added.
+
 * Changed commands
 
 watch EXPRESSION mask MASK_VALUE
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index de62ac7..051fb13 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -275,14 +275,21 @@ amd64_pseudo_register_name (struct gdbarch *gdbarch, int regnum)
     return i386_pseudo_register_name (gdbarch, regnum);
 }
 
-static enum register_status
-amd64_pseudo_register_read (struct gdbarch *gdbarch,
-			    struct regcache *regcache,
-			    int regnum, gdb_byte *buf)
+static struct value *
+amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
+				  struct regcache *regcache,
+				  int regnum)
 {
   gdb_byte raw_buf[MAX_REGISTER_SIZE];
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum register_status status;
+  struct value *result_value;
+  gdb_byte *buf;
+
+  result_value = allocate_value (register_type (gdbarch, regnum));
+  VALUE_LVAL (result_value) = lval_register;
+  VALUE_REGNUM (result_value) = regnum;
+  buf = value_contents_raw (result_value);
 
   if (i386_byte_regnum_p (gdbarch, regnum))
     {
@@ -297,15 +304,19 @@ amd64_pseudo_register_read (struct gdbarch *gdbarch,
 				      raw_buf);
 	  if (status == REG_VALID)
 	    memcpy (buf, raw_buf + 1, 1);
+	  else
+	    mark_value_bytes_unavailable (result_value, 0,
+					  TYPE_LENGTH (value_type (result_value)));
 	}
       else
 	{
 	  status = regcache_raw_read (regcache, gpnum, raw_buf);
 	  if (status == REG_VALID)
 	    memcpy (buf, raw_buf, 1);
+	  else
+	    mark_value_bytes_unavailable (result_value, 0,
+					  TYPE_LENGTH (value_type (result_value)));
 	}
-
-      return status;
     }
   else if (i386_dword_regnum_p (gdbarch, regnum))
     {
@@ -314,11 +325,15 @@ amd64_pseudo_register_read (struct gdbarch *gdbarch,
       status = regcache_raw_read (regcache, gpnum, raw_buf);
       if (status == REG_VALID)
 	memcpy (buf, raw_buf, 4);
-
-      return status;
+      else
+	mark_value_bytes_unavailable (result_value, 0,
+				      TYPE_LENGTH (value_type (result_value)));
     }
   else
-    return i386_pseudo_register_read (gdbarch, regcache, regnum, buf);
+    i386_pseudo_register_read_into_value (gdbarch, regcache, regnum,
+					  result_value);
+
+  return result_value;
 }
 
 static void
@@ -2494,8 +2509,8 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   /* Avoid wiring in the MMX registers for now.  */
   tdep->num_mmx_regs = 0;
 
-  set_gdbarch_pseudo_register_read (gdbarch,
-				    amd64_pseudo_register_read);
+  set_gdbarch_pseudo_register_read_value (gdbarch,
+					  amd64_pseudo_register_read_value);
   set_gdbarch_pseudo_register_write (gdbarch,
 				     amd64_pseudo_register_write);
 
diff --git a/gdb/common/buffer.c b/gdb/common/buffer.c
new file mode 100644
index 0000000..4ada0bc
--- /dev/null
+++ b/gdb/common/buffer.c
@@ -0,0 +1,144 @@
+/* A simple growing buffer for GDB.
+  
+   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifdef GDBSERVER
+#include "server.h"
+#else
+#include "defs.h"
+#endif
+
+#include "xml-utils.h"
+#include "buffer.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+void
+buffer_grow (struct buffer *buffer, const char *data, size_t size)
+{
+  char *new_buffer;
+  size_t new_buffer_size;
+
+  if (size == 0)
+    return;
+
+  new_buffer_size = buffer->buffer_size;
+
+  if (new_buffer_size == 0)
+    new_buffer_size = 1;
+
+  while (buffer->used_size + size > new_buffer_size)
+    new_buffer_size *= 2;
+  new_buffer = xrealloc (buffer->buffer, new_buffer_size);
+  if (!new_buffer)
+    abort ();
+  memcpy (new_buffer + buffer->used_size, data, size);
+  buffer->buffer = new_buffer;
+  buffer->buffer_size = new_buffer_size;
+  buffer->used_size += size;
+}
+
+void
+buffer_free (struct buffer *buffer)
+{
+  if (!buffer)
+    return;
+
+  xfree (buffer->buffer);
+  buffer->buffer = NULL;
+  buffer->buffer_size = 0;
+  buffer->used_size = 0;
+}
+
+void
+buffer_init (struct buffer *buffer)
+{
+  memset (buffer, 0, sizeof (*buffer));
+}
+
+char*
+buffer_finish (struct buffer *buffer)
+{
+  char *ret = buffer->buffer;
+  buffer->buffer = NULL;
+  buffer->buffer_size = 0;
+  buffer->used_size = 0;
+  return ret;
+}
+
+void
+buffer_xml_printf (struct buffer *buffer, const char *format, ...)
+{
+  va_list ap;
+  const char *f;
+  const char *prev;
+  int percent = 0;
+
+  va_start (ap, format);
+
+  prev = format;
+  for (f = format; *f; f++)
+    {
+      if (percent)
+	{
+	  char buf[32];
+	  char *p;
+	  char *str = buf;
+	  
+	  switch (*f)
+	    {
+	    case 's':
+	      str = va_arg (ap, char *);
+	      break;
+	    case 'd':
+	      sprintf (str, "%d", va_arg (ap, int));
+	      break;
+	    case 'u':
+	      sprintf (str, "%u", va_arg (ap, unsigned int));
+	      break;
+	    case 'x':
+	      sprintf (str, "%x", va_arg (ap, unsigned int));
+	      break;
+	    case 'o':
+	      sprintf (str, "%o", va_arg (ap, unsigned int));
+	      break;
+	    default:
+	      str = 0;
+	      break;
+	    }
+	  
+	  if (str)
+	    {
+	      buffer_grow (buffer, prev, f - prev - 1);
+	      p = xml_escape_text (str);
+	      buffer_grow_str (buffer, p);
+	      xfree (p);
+	      prev = f + 1;
+	    }
+	  percent = 0;
+	}
+      else if (*f == '%')
+	percent = 1;
+    }
+
+  buffer_grow_str (buffer, prev);
+  va_end (ap);
+}
+
diff --git a/gdb/common/buffer.h b/gdb/common/buffer.h


hooks/post-receive
--
Repository for Project Archer.


             reply	other threads:[~2011-07-22 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 16:46 jkratoch [this message]
2012-01-23 20:38 pmuldoon
2012-02-13 12:30 pmuldoon
2012-06-02 16:02 jkratoch
2013-01-18 21:44 jkratoch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110722164603.13546.qmail@sourceware.org \
    --to=jkratoch@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).