public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: gary@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  gbenson/rtld-probes: Merge remote branch 'gdb/master' into gbenson/rtld-probes
Date: Wed, 15 May 2013 12:37:00 -0000	[thread overview]
Message-ID: <20130515123659.20284.qmail@sourceware.org> (raw)

The branch, gbenson/rtld-probes has been updated
       via  e68b85cf908240cf301f9b627ed02d716e629c29 (commit)
       via  1a3bc74ef88ffa00a433710c22e25129021b57d2 (commit)
       via  78762a4af473e619e3d2b4c545f544ab887d5b6b (commit)
       via  7a6238d05b50241a569ca445dfa618c3cd3a638c (commit)
       via  a91d830489296a37cc62b9cedff6072b88a8e9fe (commit)
       via  a4c8dde8904ab79f98b6450b1b8deb4c4c32fa7f (commit)
       via  d3184353b6f0f57269d312135c4073c3ebeea74a (commit)
       via  405f66c46796dbbc453d77ddd8472899c7e0359e (commit)
       via  b5ae236fa445289bccdfcb131df21dc1f7512567 (commit)
       via  a6b1ebe618d1e0e0a01cbeecd11c227469eb7ce9 (commit)
       via  100be925a50e9bc2634749aef30454ef91892fae (commit)
       via  f34f21507d436eccdc711811486bdb2a3fff0fd7 (commit)
       via  499e1aa537ff95059f94e3578b46bad03476f81d (commit)
       via  9ebb53df62142e78f45f2038d1abd6cc50140cf3 (commit)
      from  32774de1333ab48c13ad61ff0869292df26ec1b0 (commit)

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

- Log -----------------------------------------------------------------
commit e68b85cf908240cf301f9b627ed02d716e629c29
Merge: 1a3bc74 78762a4
Author: Gary Benson <gbenson@redhat.com>
Date:   Wed May 15 13:36:41 2013 +0100

    Merge remote branch 'gdb/master' into gbenson/rtld-probes

commit 1a3bc74ef88ffa00a433710c22e25129021b57d2
Author: Gary Benson <gbenson@redhat.com>
Date:   Wed May 15 13:33:55 2013 +0100

    More fine-grained section map update inhibiting

commit 78762a4af473e619e3d2b4c545f544ab887d5b6b
Author: mmetzger <mmetzger>
Date:   Wed May 15 07:04:11 2013 +0000

    The "record goto" command scans its arguments for "begin", "start", or "end".
    Turn those into sub-commands.
    
    Document the "record goto" command.

commit 7a6238d05b50241a569ca445dfa618c3cd3a638c
Author: Andreas Schwab <schwab@suse.de>
Date:   Wed May 15 06:51:18 2013 +0000

    * elf64-aarch64.c (elf_backend_default_execstack): Define to 0.

commit a91d830489296a37cc62b9cedff6072b88a8e9fe
Author: sekanath <sekanath>
Date:   Wed May 15 05:06:23 2013 +0000

    gas/
    * i386-gen.c (cpu_flag_init): Add CpuFSGSBase in CPU_BDVER3_FLAGS.
    * i386-init.h: Regenerated.

commit a4c8dde8904ab79f98b6450b1b8deb4c4c32fa7f
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Wed May 15 00:00:32 2013 +0000

    *** empty log message ***

commit d3184353b6f0f57269d312135c4073c3ebeea74a
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Wed May 15 00:00:06 2013 +0000

    daily update

commit 405f66c46796dbbc453d77ddd8472899c7e0359e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue May 14 20:41:45 2013 +0000

    gdb/
    	* linespec.c (convert_linespec_to_sals): New comment for
    	SOURCE_FILENAME assignment.

commit b5ae236fa445289bccdfcb131df21dc1f7512567
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue May 14 20:39:12 2013 +0000

    gdb/
    	* cleanups.c (restore_my_cleanups): Replace gdb_assert by
    	internal_warning.

commit a6b1ebe618d1e0e0a01cbeecd11c227469eb7ce9
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 14 20:36:12 2013 +0000

    	* eval.c (parse_and_eval_long): Make 'exp' const.
    	* value.h (parse_and_eval_long): Update.

commit 100be925a50e9bc2634749aef30454ef91892fae
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 14 20:35:23 2013 +0000

    	* ui-file.c (gdb_fopen): Make arguments const.
    	* ui-file.h (gdb_fopen): Make arguments const.

commit f34f21507d436eccdc711811486bdb2a3fff0fd7
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 14 20:33:36 2013 +0000

    	* remote.c (remote_set_trace_notes): Make arguments const.
    	* target.c (update_current_target): Update cast.
    	* target.h (to_set_trace_notes): Make arguments const.

commit 499e1aa537ff95059f94e3578b46bad03476f81d
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 14 20:32:14 2013 +0000

    	* go32-nat.c (go32_terminal_info): Make 'args' const.
    	* inferior.h (child_terminal_info): Update.
    	* inflow.c (child_terminal_info): Make 'args' const.
    	* target.c (default_terminal_info): Make 'args' const.
    	(debug_to_terminal_save_ours): Likewise.
    	* target.h (struct target_ops) <to_terminal_info>: Make argument
    	const.

commit 9ebb53df62142e78f45f2038d1abd6cc50140cf3
Author: Tom Tromey <tromey@redhat.com>
Date:   Tue May 14 20:30:48 2013 +0000

    	* gcore.c (create_gcore_bfd): Make 'filename' const.
    	* gcore.h (create_gcore_bfd): Make 'filename' const.
    	* record-full.c (record_full_save): Make 'recfilename' const.
    	* target.c (target_save_record): Make 'filename' const.
    	* target.h (struct target_ops) <to_save_record>: Make 'filename'
    	const.
    	(target_save_record): Likewise.

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

Summary of changes:
 bfd/ChangeLog       |    4 +++
 bfd/elf64-aarch64.c |    1 +
 bfd/version.h       |    2 +-
 gdb/ChangeLog       |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++
 gdb/cleanups.c      |    5 +++-
 gdb/doc/ChangeLog   |    5 ++++
 gdb/doc/gdb.texinfo |   17 +++++++++++++++
 gdb/eval.c          |    2 +-
 gdb/gcore.c         |    2 +-
 gdb/gcore.h         |    2 +-
 gdb/go32-nat.c      |    2 +-
 gdb/inferior.h      |    2 +-
 gdb/inflow.c        |    2 +-
 gdb/linespec.c      |    4 +++
 gdb/objfiles.c      |   56 +++++++++++++++++++++++++++-----------------------
 gdb/record-full.c   |    4 +-
 gdb/record.c        |   54 ++++++++++++++++++++++++++++++++++++------------
 gdb/remote.c        |    3 +-
 gdb/target.c        |   12 ++++------
 gdb/target.h        |    9 ++++---
 gdb/ui-file.c       |    2 +-
 gdb/ui-file.h       |    2 +-
 gdb/value.h         |    2 +-
 gdb/version.in      |    2 +-
 opcodes/ChangeLog   |    5 ++++
 opcodes/i386-gen.c  |    2 +-
 opcodes/i386-init.h |    2 +-
 27 files changed, 193 insertions(+), 68 deletions(-)

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index eb254b7..24231ca 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2013-05-15  Andreas Schwab  <schwab@suse.de>
+
+	* elf64-aarch64.c (elf_backend_default_execstack): Define to 0.
+
 2013-05-10  Joel Brobecker  <brobecker@adacore.com>
 
 	* coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling
diff --git a/bfd/elf64-aarch64.c b/bfd/elf64-aarch64.c
index e3cae95..aef472f 100644
--- a/bfd/elf64-aarch64.c
+++ b/bfd/elf64-aarch64.c
@@ -7181,6 +7181,7 @@ const struct elf_size_info elf64_aarch64_size_info =
 #define elf_backend_may_use_rela_p     1
 #define elf_backend_default_use_rela_p 1
 #define elf_backend_got_header_size (GOT_ENTRY_SIZE * 3)
+#define elf_backend_default_execstack  0
 
 #undef  elf_backend_obj_attrs_section
 #define elf_backend_obj_attrs_section		".ARM.attributes"
diff --git a/bfd/version.h b/bfd/version.h
index 89b903a..4fbb51d 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20130514
+#define BFD_VERSION_DATE 20130515
 #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 c978f0b..7c6e1f0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,59 @@
+2013-05-15  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* record.c (record_goto_cmdlist): New.
+	(cmd_record_goto): Split into this ...
+	(cmd_record_goto_begin): ... this
+	(cmd_record_goto_end): ... and this.
+	(_initialize_record): Change "record goto" to prefix command.
+	Add commands for "record goto begin" and "record goto end".
+	Add an alias for "record goto start" to "record goto begin".
+
+2013-05-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* linespec.c (convert_linespec_to_sals): New comment for
+	SOURCE_FILENAME assignment.
+
+2013-05-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* cleanups.c (restore_my_cleanups): Replace gdb_assert by
+	internal_warning.
+
+2013-05-14  Tom Tromey  <tromey@redhat.com>
+
+	* eval.c (parse_and_eval_long): Make 'exp' const.
+	* value.h (parse_and_eval_long): Update.
+
+2013-05-14  Tom Tromey  <tromey@redhat.com>
+
+	* ui-file.c (gdb_fopen): Make arguments const.
+	* ui-file.h (gdb_fopen): Make arguments const.
+
+2013-05-14  Tom Tromey  <tromey@redhat.com>
+
+	* remote.c (remote_set_trace_notes): Make arguments const.
+	* target.c (update_current_target): Update cast.
+	* target.h (to_set_trace_notes): Make arguments const.
+
+2013-05-14  Tom Tromey  <tromey@redhat.com>
+
+	* go32-nat.c (go32_terminal_info): Make 'args' const.
+	* inferior.h (child_terminal_info): Update.
+	* inflow.c (child_terminal_info): Make 'args' const.
+	* target.c (default_terminal_info): Make 'args' const.
+	(debug_to_terminal_save_ours): Likewise.
+	* target.h (struct target_ops) <to_terminal_info>: Make argument
+	const.
+
+2013-05-13  Tom Tromey  <tromey@redhat.com>
+
+	* gcore.c (create_gcore_bfd): Make 'filename' const.
+	* gcore.h (create_gcore_bfd): Make 'filename' const.
+	* record-full.c (record_full_save): Make 'recfilename' const.
+	* target.c (target_save_record): Make 'filename' const.
+	* target.h (struct target_ops) <to_save_record>: Make 'filename'
+	const.
+	(target_save_record): Likewise.
+
 2013-05-13  Tom Tromey  <tromey@redhat.com>
 
     	PR gdb/15338:
diff --git a/gdb/cleanups.c b/gdb/cleanups.c
index 02db9f5..898e526 100644
--- a/gdb/cleanups.c
+++ b/gdb/cleanups.c
@@ -261,7 +261,10 @@ save_final_cleanups (void)
 static void
 restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain)
 {
-  gdb_assert (*pmy_chain == SENTINEL_CLEANUP);
+  if (*pmy_chain != SENTINEL_CLEANUP)
+    internal_warning (__FILE__, __LINE__,
+		      _("restore_my_cleanups has found a stale cleanup"));
+
   *pmy_chain = chain;
 }
 
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 908fbb4..b14e17a 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-15  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.texinfo (Process Record and Replay): Document the
+	"record goto" command and its sub-commands.
+
 2013-05-10 Phil Muldoon  <pmuldoon@redhat.com>
 
 	* gdb.texinfo (Backtrace): Add "no-filter" argument.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 1869d74..02c2408 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6209,6 +6209,23 @@ usual ``live'' debugging of the process from that state.
 When the inferior process exits, or @value{GDBN} detaches from it,
 process record and replay target will automatically stop itself.
 
+@kindex record goto
+@item record goto
+Go to a specific location in the execution log.  There are several
+ways to specify the location to go to:
+
+@table @code
+@item record goto begin
+@itemx record goto start
+Go to the beginning of the execution log.
+
+@item record goto end
+Go to the end of the execution log.
+
+@item record goto @var{n}
+Go to instruction number @var{n} in the execution log.
+@end table
+
 @kindex record save
 @item record save @var{filename}
 Save the execution log to a file @file{@var{filename}}.
diff --git a/gdb/eval.c b/gdb/eval.c
index cf1fda9..539489f 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -91,7 +91,7 @@ parse_and_eval_address (const char *exp)
 /* Like parse_and_eval_address, but treats the value of the expression
    as an integer, not an address, returns a LONGEST, not a CORE_ADDR.  */
 LONGEST
-parse_and_eval_long (char *exp)
+parse_and_eval_long (const char *exp)
 {
   struct expression *expr = parse_expression (exp);
   LONGEST retval;
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 1d1c20f..620be54 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -49,7 +49,7 @@ static int gcore_memory_sections (bfd *);
    Open a new bfd core file for output, and return the handle.  */
 
 bfd *
-create_gcore_bfd (char *filename)
+create_gcore_bfd (const char *filename)
 {
   bfd *obfd = gdb_bfd_openw (filename, default_gcore_target ());
 
diff --git a/gdb/gcore.h b/gdb/gcore.h
index 8d2e8b6..0f67a1e 100644
--- a/gdb/gcore.h
+++ b/gdb/gcore.h
@@ -20,7 +20,7 @@
 #if !defined (GCORE_H)
 #define GCORE_H 1
 
-extern bfd *create_gcore_bfd (char *filename);
+extern bfd *create_gcore_bfd (const char *filename);
 extern void write_gcore_file (bfd *obfd);
 extern bfd *load_corefile (char *filename, int from_tty);
 
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index ea6d1ca..0d9bb9d 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -876,7 +876,7 @@ go32_terminal_init (void)
 }
 
 static void
-go32_terminal_info (char *args, int from_tty)
+go32_terminal_info (const char *args, int from_tty)
 {
   printf_unfiltered ("Inferior's terminal is in %s mode.\n",
 		     !inf_mode_valid
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 196d033..2a5770d 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -175,7 +175,7 @@ extern void default_print_registers_info (struct gdbarch *gdbarch,
 					  struct frame_info *frame,
 					  int regnum, int all);
 
-extern void child_terminal_info (char *, int);
+extern void child_terminal_info (const char *, int);
 
 extern void term_info (char *, int);
 
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 5146b3a..79a99d1 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -563,7 +563,7 @@ term_info (char *arg, int from_tty)
 }
 
 void
-child_terminal_info (char *args, int from_tty)
+child_terminal_info (const char *args, int from_tty)
 {
   struct inferior *inf;
   struct terminal_info *tinfo;
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 1c7a7a0..989c8d2 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -2059,6 +2059,10 @@ convert_linespec_to_sals (struct linespec_state *state, linespec_p ls)
 	  {
 	    const char *fullname = symtab_to_fullname (state->default_symtab);
 
+	    /* It may be more appropriate to keep DEFAULT_SYMTAB in its symtab
+	       form so that displaying SOURCE_FILENAME can follow the current
+	       FILENAME_DISPLAY_STRING setting.  But as it is used only rarely
+	       it has been kept for code simplicity only in absolute form.  */
 	    ls->source_filename = xstrdup (fullname);
 	  }
     }
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 6378339..3af1064 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -67,11 +67,17 @@ struct objfile *rt_common_objfile;	/* For runtime common symbols */
 
 struct objfile_pspace_info
 {
-  int objfiles_changed_p;
   struct obj_section **sections;
   int num_sections;
 
-  /* Nonzero if section map updates should be inhibited.  */
+  /* Nonzero if object files have been added since the section map
+     was last updated.  */
+  int new_objfiles_available;
+
+  /* Nonzero if the section map MUST be updated before use.  */
+  int section_map_dirty;
+
+  /* Nonzero if section map updates should be inhibited if possible.  */
   int inhibit_updates;
 };
 
@@ -320,7 +326,7 @@ allocate_objfile (bfd *abfd, int flags)
   objfile->flags |= flags;
 
   /* Rebuild section map next time we need it.  */
-  get_objfile_pspace_data (objfile->pspace)->objfiles_changed_p = 1;
+  get_objfile_pspace_data (objfile->pspace)->new_objfiles_available = 1;
 
   return objfile;
 }
@@ -649,8 +655,7 @@ free_objfile (struct objfile *objfile)
   obstack_free (&objfile->objfile_obstack, 0);
 
   /* Rebuild section map next time we need it.  */
-  gdb_assert (!get_objfile_pspace_data (objfile->pspace)->inhibit_updates);
-  get_objfile_pspace_data (objfile->pspace)->objfiles_changed_p = 1;
+  get_objfile_pspace_data (objfile->pspace)->section_map_dirty = 1;
 
   xfree (objfile);
 }
@@ -830,7 +835,7 @@ objfile_relocate1 (struct objfile *objfile,
   }
 
   /* Rebuild section map next time we need it.  */
-  get_objfile_pspace_data (objfile->pspace)->objfiles_changed_p = 1;
+  get_objfile_pspace_data (objfile->pspace)->section_map_dirty = 1;
 
   /* Update the table in exec_ops, used to read memory.  */
   ALL_OBJFILE_OSECTIONS (objfile, s)
@@ -1295,11 +1300,14 @@ static void
 update_section_map (struct program_space *pspace,
 		    struct obj_section ***pmap, int *pmap_size)
 {
+  struct objfile_pspace_info *pspace_info;
   int alloc_size, map_size, i;
   struct obj_section *s, **map;
   struct objfile *objfile;
 
-  gdb_assert (get_objfile_pspace_data (pspace)->objfiles_changed_p != 0);
+  pspace_info = get_objfile_pspace_data (current_program_space);
+  gdb_assert (pspace_info->section_map_dirty != 0
+	      || pspace_info->new_objfiles_available != 0);
 
   map = *pmap;
   xfree (map);
@@ -1355,21 +1363,6 @@ bsearch_cmp (const void *key, const void *elt)
   return 1;
 }
 
-static void
-update_space_info_sections (struct objfile_pspace_info *pspace_info)
-{
-  if (pspace_info->objfiles_changed_p && !pspace_info->inhibit_updates)
-    {
-      update_section_map (current_program_space,
-			  &pspace_info->sections,
-			  &pspace_info->num_sections);
-
-      /* Don't need updates to section map until objfiles are added,
-         removed or relocated.  */
-      pspace_info->objfiles_changed_p = 0;
-    }
-}
-
 /* Returns a section whose range includes PC or NULL if none found.   */
 
 struct obj_section *
@@ -1384,7 +1377,19 @@ find_pc_section (CORE_ADDR pc)
     return s;
 
   pspace_info = get_objfile_pspace_data (current_program_space);
-  update_space_info_sections (pspace_info);
+  if (pspace_info->section_map_dirty
+      || (pspace_info->new_objfiles_available
+	  && !pspace_info->inhibit_updates))
+    {
+      update_section_map (current_program_space,
+			  &pspace_info->sections,
+			  &pspace_info->num_sections);
+
+      /* Don't need updates to section map until objfiles are added,
+         removed or relocated.  */
+      pspace_info->new_objfiles_available = 0;
+      pspace_info->section_map_dirty = 0;
+    }
 
   /* The C standard (ISO/IEC 9899:TC2) requires the BASE argument to
      bsearch be non-NULL.  */
@@ -1424,14 +1429,14 @@ in_plt_section (CORE_ADDR pc, char *name)
 }
 \f
 
-/* Set objfiles_changed_p so section map will be rebuilt next time it
+/* Set section_map_dirty so section map will be rebuilt next time it
    is used.  Called by reread_symbols.  */
 
 void
 objfiles_changed (void)
 {
   /* Rebuild section map next time we need it.  */
-  get_objfile_pspace_data (current_program_space)->objfiles_changed_p = 1;
+  get_objfile_pspace_data (current_program_space)->section_map_dirty = 1;
 }
 
 /* See comments in objfiles.h.  */
@@ -1439,7 +1444,6 @@ objfiles_changed (void)
 void
 inhibit_section_map_updates (void)
 {
-  update_space_info_sections (get_objfile_pspace_data (current_program_space));
   get_objfile_pspace_data (current_program_space)->inhibit_updates = 1;
 }
 
diff --git a/gdb/record-full.c b/gdb/record-full.c
index aa3ad85..3a8d326 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -251,7 +251,7 @@ static void
 
 static void record_full_goto_insn (struct record_full_entry *entry,
 				   enum exec_direction_kind dir);
-static void record_full_save (char *recfilename);
+static void record_full_save (const char *recfilename);
 
 /* Alloc and free functions for record_full_reg, record_full_mem, and
    record_full_end entries.  */
@@ -2632,7 +2632,7 @@ record_full_save_cleanups (void *data)
    format, with an extra section for our data.  */
 
 static void
-record_full_save (char *recfilename)
+record_full_save (const char *recfilename)
 {
   struct record_full_entry *cur_record_full_list;
   uint32_t magic;
diff --git a/gdb/record.c b/gdb/record.c
index 76d9fd2..cbbe365 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -48,6 +48,7 @@ static unsigned int record_call_history_size = 10;
 static unsigned int record_call_history_size_setshow_var;
 
 struct cmd_list_element *record_cmdlist = NULL;
+struct cmd_list_element *record_goto_cmdlist = NULL;
 struct cmd_list_element *set_record_cmdlist = NULL;
 struct cmd_list_element *show_record_cmdlist = NULL;
 struct cmd_list_element *info_record_cmdlist = NULL;
@@ -314,23 +315,39 @@ cmd_record_save (char *args, int from_tty)
 void
 cmd_record_goto (char *arg, int from_tty)
 {
-  require_record_target ();
+  ULONGEST insn;
 
   if (arg == NULL || *arg == '\0')
     error (_("Command requires an argument (insn number to go to)."));
 
-  if (strncmp (arg, "start", strlen ("start")) == 0
-      || strncmp (arg, "begin", strlen ("begin")) == 0)
-    target_goto_record_begin ();
-  else if (strncmp (arg, "end", strlen ("end")) == 0)
-    target_goto_record_end ();
-  else
-    {
-      ULONGEST insn;
+  insn = parse_and_eval_long (arg);
 
-      insn = parse_and_eval_long (arg);
-      target_goto_record (insn);
-    }
+  require_record_target ();
+  target_goto_record (insn);
+}
+
+/* The "record goto begin" command.  */
+
+static void
+cmd_record_goto_begin (char *arg, int from_tty)
+{
+  if (arg != NULL && *arg != '\0')
+    error (_("Junk after argument: %s."), arg);
+
+  require_record_target ();
+  target_goto_record_begin ();
+}
+
+/* The "record goto end" command.  */
+
+static void
+cmd_record_goto_end (char *arg, int from_tty)
+{
+  if (arg != NULL && *arg != '\0')
+    error (_("Junk after argument: %s."), arg);
+
+  require_record_target ();
+  target_goto_record_end ();
 }
 
 /* Read an instruction number from an argument string.  */
@@ -751,10 +768,19 @@ Default filename is 'gdb_record.<process_id>'."),
            &record_cmdlist);
   add_alias_cmd ("s", "stop", class_obscure, 1, &record_cmdlist);
 
-  add_cmd ("goto", class_obscure, cmd_record_goto, _("\
+  add_prefix_cmd ("goto", class_obscure, cmd_record_goto, _("\
 Restore the program to its state at instruction number N.\n\
 Argument is instruction number, as shown by 'info record'."),
-	   &record_cmdlist);
+		  &record_goto_cmdlist, "record goto ", 1, &record_cmdlist);
+
+  add_cmd ("begin", class_obscure, cmd_record_goto_begin,
+	   _("Go to the beginning of the execution log."),
+	   &record_goto_cmdlist);
+  add_alias_cmd ("start", "begin", class_obscure, 1, &record_goto_cmdlist);
+
+  add_cmd ("end", class_obscure, cmd_record_goto_end,
+	   _("Go to the end of the execution log."),
+	   &record_goto_cmdlist);
 
   add_cmd ("instruction-history", class_obscure, cmd_record_insn_history, _("\
 Print disassembled instructions stored in the execution log.\n\
diff --git a/gdb/remote.c b/gdb/remote.c
index d6e5522..e1cf8a4 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -11142,7 +11142,8 @@ remote_set_trace_buffer_size (LONGEST val)
 }
 
 static int


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


             reply	other threads:[~2013-05-15 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 12:37 gary [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-04 14:29 gary
2013-06-06  9:06 gary
2013-05-23 11:52 gary
2013-05-14 13:15 gary

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=20130515123659.20284.qmail@sourceware.org \
    --to=gary@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).