This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH / top.c: Complete patch for "can't-quit-gdb" problem


The following has been applied to mainline and gdb 6.0 as an obvious fix.
The indirect call to quit_target() was passing a char * argument instead of
passing a pointer to a struct qt_args.

-- Jeff J.

2003-09-22 Jeff Johnston <jjohnstn@redhat.com>

        * top.c (quit_force): Fix indirect call to quit_target so
        a struct qt_args pointer is passed.

Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.78
diff -u -r1.78 top.c
--- top.c	21 Sep 2003 01:26:45 -0000	1.78
+++ top.c	22 Sep 2003 17:35:52 -0000
@@ -1478,6 +1478,7 @@
 quit_force (char *args, int from_tty)
 {
   int exit_code = 0;
+  struct qt_args qt;
 
   /* An optional expression may be used to cause gdb to terminate with the 
      value of that expression. */
@@ -1488,8 +1489,11 @@
       exit_code = (int) value_as_long (val);
     }
 
+  qt.args = args;
+  qt.from_tty = from_tty;
+
   /* We want to handle any quit errors and exit regardless.  */
-  catch_errors (quit_target, args,
+  catch_errors (quit_target, &qt,
 	        "Quitting: ", RETURN_MASK_ALL);
 
   exit (exit_code);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]