* Makefile.in (acconfig_h): Remove incorrect macro.
[deliverable/binutils-gdb.git] / gdb / event-loop.c
index 03eb41c6b1674df45ac2f06467e3ea27df09b455..c8d12f925df3a0925ba3c7ccb974b84d30e73228 100644 (file)
@@ -1,5 +1,5 @@
 /* Event loop machinery for GDB, the GNU debugger.
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
    This file is part of GDB.
@@ -392,10 +392,17 @@ start_event_loop (void)
      longer any event sources registered. */
   while (1)
     {
-      int result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
-      if (result < 0)
+      int gdb_result;
+
+      gdb_result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
+      if (gdb_result < 0)
        break;
-      if (result == 0)
+
+      /* If we long-jumped out of do_one_event, we probably
+         didn't get around to resetting the prompt, which leaves
+         readline in a messed-up state.  Reset it here. */
+
+      if (gdb_result == 0)
        {
          /* FIXME: this should really be a call to a hook that is
             interface specific, because interfaces can display the
This page took 0.02384 seconds and 4 git commands to generate.