343902  --vgdb=yes doesn't break when --xml=yes is used

Changes ensures that gdbserver is called also when xml is yes.
When gdbserver is set to yes, we have to temporarily reset 
xml output to no, as gdbserver output (e.g. print the last error)
has to be printed to gdb.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15031 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_errormgr.c b/coregrind/m_errormgr.c
index 6b59c8e..bcdd2a0 100644
--- a/coregrind/m_errormgr.c
+++ b/coregrind/m_errormgr.c
@@ -525,9 +525,6 @@
 {
    Bool still_noisy = True;
 
-   /* Should be assured by caller */
-   vg_assert( ! VG_(clo_xml) );
-
    /* if user wants to debug from a certain error nr, then wait for gdb/vgdb */
    if (VG_(clo_vgdb) != Vg_VgdbNo
        && allow_db_attach 
@@ -581,9 +578,8 @@
 
    * prints the tool-specific parts of the message
 
-   * calls do_actions_on_error.  This optionally does a debugger
-     attach (and detach), and optionally prints a suppression; both
-     of these may require user input.
+   * calls do_actions_on_error.  This optionally does a gdbserver call
+     and optionally prints a suppression; both of these may require user input.
 */
 static void pp_Error ( const Error* err, Bool allow_db_attach, Bool xml )
 {
@@ -593,8 +589,6 @@
 
    if (xml) {
 
-      /* Note, allow_db_attach is ignored in here. */
- 
       /* Ensure that suppression generation is either completely
          enabled or completely disabled; either way, we won't require
          any user input.  m_main.process_cmd_line_options should
@@ -646,8 +640,9 @@
       if (VG_(clo_error_markers)[1])
          VG_(umsg)("%s\n", VG_(clo_error_markers)[1]);
 
-      do_actions_on_error(err, allow_db_attach);
    }
+
+   do_actions_on_error(err, allow_db_attach);
 }