public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer: cherry-pick: Better describe the set target-async command.
@ 2009-03-07 22:08 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2009-03-07 22:08 UTC (permalink / raw)
  To: archer-commits

The branch, archer has been updated
       via  543fb2154d3bd551344b990b911be5c6cc703504 (commit)
       via  f2bb5f6434609f26002e96708430d2871d4a8eec (commit)
       via  32e0ad877f650025c260445d7ba901123f1ad96a (commit)
      from  87fb2a332e40d259a097c835e6918254c7a7a088 (commit)

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

- Log -----------------------------------------------------------------
commit 543fb2154d3bd551344b990b911be5c6cc703504
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sat Mar 7 23:06:10 2009 +0100

    cherry-pick: Better describe the set target-async command.
    [gdb/master] 6e9407b3a655b3339a97bfeb9f79e6bf8e9a90ae
    
    	* gdb.texinfo (Background Execution): Better describe the set
    	target-async command.
    	(Maintenance Commands): Delete description of the `maint set/show
    	linux-async' and `maint set/show remote-async' commands.

commit f2bb5f6434609f26002e96708430d2871d4a8eec
Author: Pedro Alves <pedro@codesourcery.com>
Date:   Thu Mar 5 22:37:09 2009 +0000

    cherry-pick: Fix internal-error on permanent breakpoint on top of permanent breakpoint.
    [gdb/master] a31bdfa66308b389d2a94de814afafbb4f0d9ff5
    
    gdb/
    2009-03-05  Pedro Alves  <pedro@codesourcery.com>
    
    	* breakpoint.c (check_duplicates_for): Skip permanent breakpoints
    	duplicates of permanent breakpoints.
    
    gdb/testsuite/
    2009-03-05  Pedro Alves  <pedro@codesourcery.com>
    
    	* gdb.arch/i386-permbkpt.S, gdb.arch/i386-permbkpt.exp: New.

commit 32e0ad877f650025c260445d7ba901123f1ad96a
Author: Pedro Alves <pedro@codesourcery.com>
Date:   Tue Mar 3 13:35:23 2009 +0000

    cherry-pick: Fix excessive: Quitting: You can't do that without a process to debug.
    [gdb/master] fb597d271837a83d02703ca6fad12f9590845b3e
    
    	* top.c (quit_target): Check for target_has_execution before
    	killing or detaching from inferiors.

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

Summary of changes:
 gdb/breakpoint.c                         |    7 ++--
 gdb/doc/gdb.texinfo                      |   45 ++++++++++---------------
 gdb/testsuite/ChangeLog                  |    4 ++
 gdb/testsuite/gdb.arch/i386-permbkpt.S   |   30 +++++++++++++++++
 gdb/testsuite/gdb.arch/i386-permbkpt.exp |   52 ++++++++++++++++++++++++++++++
 gdb/top.c                                |    3 +-
 6 files changed, 110 insertions(+), 31 deletions(-)
 create mode 100644 gdb/testsuite/gdb.arch/i386-permbkpt.S
 create mode 100644 gdb/testsuite/gdb.arch/i386-permbkpt.exp

First 500 lines of diff:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index e9bc53f..38a17a1 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3974,8 +3974,8 @@ check_duplicates_for (CORE_ADDR address, struct obj_section *section)
     }
 
   /* If we found a permanent breakpoint at this address, go over the
-     list again and declare all the other breakpoints there to be the
-     duplicates.  */
+     list again and declare all the other breakpoints there (except
+     other permanent breakpoints) to be the duplicates.  */
   if (perm_bp)
     {
       perm_bp->duplicate = 0;
@@ -3989,7 +3989,8 @@ check_duplicates_for (CORE_ADDR address, struct obj_section *section)
       ALL_BP_LOCATIONS (b)
 	if (b != perm_bp)
 	  {
-	    if (b->owner->enable_state != bp_disabled
+	    if (b->owner->enable_state != bp_permanent
+		&& b->owner->enable_state != bp_disabled
 		&& b->owner->enable_state != bp_call_disabled
 		&& b->enabled && !b->shlib_disabled		
 		&& b->address == address	/* address / overlay match */
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 86941fe..d2c0f1e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4815,6 +4815,24 @@ the program to report that some thread has stopped before prompting for
 another command.  In background execution, @value{GDBN} immediately gives
 a command prompt so that you can issue other commands while your program runs.
 
+You need to explicitly enable asynchronous mode before you can use
+background execution commands.  You can use these commands to
+manipulate the asynchronous mode setting:
+
+@table @code
+@kindex set target-async
+@item set target-async on
+Enable asynchronous mode.
+@item set target-async off
+Disable asynchronous mode.
+@kindex show target-async
+@item show target-async
+Show the current target-async setting.
+@end table
+
+If the target doesn't support async mode, @value{GDBN} issues an error
+message if you attempt to use the background execution commands.
+
 To specify background execution, add a @code{&} to the command.  For example,
 the background form of the @code{continue} command is @code{continue&}, or
 just @code{c&}.  The execution commands that accept background execution
@@ -4880,11 +4898,6 @@ only the current thread.  To stop the whole program in non-stop mode,
 use @code{interrupt -a}.
 @end table
 
-You may need to explicitly enable async mode before you can use background
-execution commands, with the @code{set target-async 1} command.  If the
-target doesn't support async mode, @value{GDBN} issues an error message
-if you attempt to use the background execution commands.
-
 @node Thread-Specific Breakpoints
 @subsection Thread-Specific Breakpoints
 
@@ -26633,28 +26646,6 @@ data in a @file{gmon.out} file, be sure to move it to a safe location.
 Configuring with @samp{--enable-profiling} arranges for @value{GDBN} to be
 compiled with the @samp{-pg} compiler option.
 
-@kindex maint set linux-async
-@kindex maint show linux-async
-@cindex asynchronous support
-@item maint set linux-async
-@itemx maint show linux-async
-Control the GNU/Linux native asynchronous support 
-(@pxref{Background Execution}) of @value{GDBN}.
-
-GNU/Linux native asynchronous support will be disabled until you use
-the @samp{maint set linux-async} command to enable it.
-
-@kindex maint set remote-async
-@kindex maint show remote-async
-@cindex asynchronous support
-@item maint set remote-async
-@itemx maint show remote-async
-Control the remote asynchronous support 
-(@pxref{Background Execution}) of @value{GDBN}.
-
-Remote asynchronous support will be disabled until you use
-the @samp{maint set remote-async} command to enable it.
-
 @kindex maint show-debug-regs
 @cindex x86 hardware debug registers
 @item maint show-debug-regs
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e3aaeab..e886869 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-05  Pedro Alves  <pedro@codesourcery.com>
+
+	* gdb.arch/i386-permbkpt.S, gdb.arch/i386-permbkpt.exp: New.
+
 2009-02-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* gdb.base/macscp.exp (objfile): Move it to ${objdir}/${subdir}/.
diff --git a/gdb/testsuite/gdb.arch/i386-permbkpt.S b/gdb/testsuite/gdb.arch/i386-permbkpt.S
new file mode 100644
index 0000000..02a31d6
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-permbkpt.S
@@ -0,0 +1,30 @@
+/* Copyright 2009 Free Software Foundation, Inc.
+
+   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/>.
+
+   This file is part of the gdb testsuite.  */
+
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+#ifdef SYMBOL_PREFIX
+# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
+#else
+# define SYMBOL(str)     str
+#endif
+
+	.global SYMBOL(main)
+SYMBOL(main):
+	int3
+	ret
diff --git a/gdb/testsuite/gdb.arch/i386-permbkpt.exp b/gdb/testsuite/gdb.arch/i386-permbkpt.exp
new file mode 100644
index 0000000..f1930e5
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-permbkpt.exp
@@ -0,0 +1,52 @@
+# Copyright (C) 2009 Free Software Foundation, Inc.
+
+# 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/>.
+
+
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+    strace $tracelevel
+}
+
+# Test inserting breakpoints over permanent breakpoints on i386 and amd64.
+
+if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
+    verbose "Skipping i386 test for multi break at permanent breakpoint location."
+    return
+}
+
+set testfile "i386-permbkpt"
+set srcfile ${testfile}.S
+set binfile ${objdir}/${subdir}/${testfile}
+
+# Some targets have leading underscores on assembly symbols.
+# TODO: detect this automatically
+set additional_flags ""
+if { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } then {
+    set additional_flags "additional_flags=-DSYMBOL_PREFIX=_"
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
+    untested i386-permbkpt.exp
+    return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "break main" "" "First permanent break"
+gdb_test "break main" "" "Second permanent break"
diff --git a/gdb/top.c b/gdb/top.c
index 83c54db..d6b17f0 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1247,7 +1247,8 @@ quit_target (void *arg)
   struct qt_args *qt = (struct qt_args *)arg;
 
   /* Kill or detach all inferiors.  */
-  iterate_over_inferiors (kill_or_detach, qt);
+  if (target_has_execution)
+    iterate_over_inferiors (kill_or_detach, qt);
 
   /* Give all pushed targets a chance to do minimal cleanup, and pop
      them all out.  */


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-07 22:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-07 22:08 [SCM] archer: cherry-pick: Better describe the set target-async command jkratoch

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).