| OLD | NEW |
| 1 /* Top level stuff for GDB, the GNU debugger. | 1 /* Top level stuff for GDB, the GNU debugger. |
| 2 | 2 |
| 3 Copyright (C) 1986-2012 Free Software Foundation, Inc. | 3 Copyright (C) 1986-2012 Free Software Foundation, Inc. |
| 4 | 4 |
| 5 This file is part of GDB. | 5 This file is part of GDB. |
| 6 | 6 |
| 7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
| 9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
| 10 (at your option) any later version. | 10 (at your option) any later version. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "top.h" | 40 #include "top.h" |
| 41 #include "version.h" | 41 #include "version.h" |
| 42 #include "serial.h" | 42 #include "serial.h" |
| 43 #include "doublest.h" | 43 #include "doublest.h" |
| 44 #include "gdb_assert.h" | 44 #include "gdb_assert.h" |
| 45 #include "main.h" | 45 #include "main.h" |
| 46 #include "event-loop.h" | 46 #include "event-loop.h" |
| 47 #include "gdbthread.h" | 47 #include "gdbthread.h" |
| 48 #include "python/python.h" | 48 #include "python/python.h" |
| 49 #include "interps.h" | 49 #include "interps.h" |
| 50 #include "observer.h" |
| 50 | 51 |
| 51 /* readline include files. */ | 52 /* readline include files. */ |
| 52 #include "readline/readline.h" | 53 #include "readline/readline.h" |
| 53 #include "readline/history.h" | 54 #include "readline/history.h" |
| 54 | 55 |
| 55 /* readline defines this. */ | 56 /* readline defines this. */ |
| 56 #undef savestring | 57 #undef savestring |
| 57 | 58 |
| 58 #include <sys/types.h> | 59 #include <sys/types.h> |
| 59 | 60 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 92 |
| 92 int inhibit_gdbinit = 0; | 93 int inhibit_gdbinit = 0; |
| 93 | 94 |
| 94 /* If nonzero, and GDB has been configured to be able to use windows, | 95 /* If nonzero, and GDB has been configured to be able to use windows, |
| 95 attempt to open them upon startup. */ | 96 attempt to open them upon startup. */ |
| 96 | 97 |
| 97 int use_windows = 0; | 98 int use_windows = 0; |
| 98 | 99 |
| 99 extern char lang_frame_mismatch_warn[]; /* language.c */ | 100 extern char lang_frame_mismatch_warn[]; /* language.c */ |
| 100 | 101 |
| 101 /* Flag for whether we want all the "from_tty" gubbish printed. */ | 102 /* Flag for whether we want to confirm potentially dangerous |
| 103 operations. Default is yes. */ |
| 102 | 104 |
| 103 int caution = 1;» » /* Default is yes, sigh. */ | 105 int confirm = 1; |
| 106 |
| 104 static void | 107 static void |
| 105 show_caution (struct ui_file *file, int from_tty, | 108 show_confirm (struct ui_file *file, int from_tty, |
| 106 struct cmd_list_element *c, const char *value) | 109 struct cmd_list_element *c, const char *value) |
| 107 { | 110 { |
| 108 fprintf_filtered (file, _("Whether to confirm potentially " | 111 fprintf_filtered (file, _("Whether to confirm potentially " |
| 109 "dangerous operations is %s.\n"), | 112 "dangerous operations is %s.\n"), |
| 110 value); | 113 value); |
| 111 } | 114 } |
| 112 | 115 |
| 113 /* stdio stream that command input is being read from. Set to stdin | 116 /* stdio stream that command input is being read from. Set to stdin |
| 114 normally. Set by source_command to the file we are sourcing. Set | 117 normally. Set by source_command to the file we are sourcing. Set |
| 115 to NULL if we are executing a user-defined command or interacting | 118 to NULL if we are executing a user-defined command or interacting |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 285 |
| 283 /* Handler for SIGHUP. */ | 286 /* Handler for SIGHUP. */ |
| 284 | 287 |
| 285 #ifdef SIGHUP | 288 #ifdef SIGHUP |
| 286 /* NOTE 1999-04-29: This function will be static again, once we modify | 289 /* NOTE 1999-04-29: This function will be static again, once we modify |
| 287 gdb to use the event loop as the default command loop and we merge | 290 gdb to use the event loop as the default command loop and we merge |
| 288 event-top.c into this file, top.c. */ | 291 event-top.c into this file, top.c. */ |
| 289 /* static */ void | 292 /* static */ void |
| 290 quit_cover (void) | 293 quit_cover (void) |
| 291 { | 294 { |
| 292 caution = 0;» » » /* Throw caution to the wind -- we're exiting. | 295 /* Stop asking user for confirmation --- we're exiting. This |
| 293 » » » » This prevents asking the user dumb | 296 prevents asking the user dumb questions. */ |
| 294 » » » » questions. */ | 297 confirm = 0; |
| 295 quit_command ((char *) 0, 0); | 298 quit_command ((char *) 0, 0); |
| 296 } | 299 } |
| 297 #endif /* defined SIGHUP */ | 300 #endif /* defined SIGHUP */ |
| 298 | 301 |
| 299 | 302 |
| 300 /* Line number we are currently in, in a file which is being sourced. */ | 303 /* Line number we are currently in, in a file which is being sourced. */ |
| 301 /* NOTE 1999-04-29: This variable will be static again, once we modify | 304 /* NOTE 1999-04-29: This variable will be static again, once we modify |
| 302 gdb to use the event loop as the default command loop and we merge | 305 gdb to use the event loop as the default command loop and we merge |
| 303 event-top.c into this file, top.c. */ | 306 event-top.c into this file, top.c. */ |
| 304 /* static */ int source_line_number; | 307 /* static */ int source_line_number; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 struct cleanup *cleanup; | 353 struct cleanup *cleanup; |
| 351 | 354 |
| 352 mark = value_mark (); | 355 mark = value_mark (); |
| 353 cleanup = make_cleanup_value_free_to_mark (mark); | 356 cleanup = make_cleanup_value_free_to_mark (mark); |
| 354 | 357 |
| 355 /* With multiple threads running while the one we're examining is | 358 /* With multiple threads running while the one we're examining is |
| 356 stopped, the dcache can get stale without us being able to detect | 359 stopped, the dcache can get stale without us being able to detect |
| 357 it. For the duration of the command, though, use the dcache to | 360 it. For the duration of the command, though, use the dcache to |
| 358 help things like backtrace. */ | 361 help things like backtrace. */ |
| 359 if (non_stop) | 362 if (non_stop) |
error: old chunk mismatch |
None
| OLD | NEW |