| 1 | /* Displaced stepping related things. |
| 2 | |
| 3 | Copyright (C) 2020 Free Software Foundation, Inc. |
| 4 | |
| 5 | This file is part of GDB. |
| 6 | |
| 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 |
| 9 | the Free Software Foundation; either version 3 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | |
| 20 | #include "defs.h" |
| 21 | #include "displaced-stepping.h" |
| 22 | #include "cli/cli-cmds.h" |
| 23 | |
| 24 | #include "command.h" |
| 25 | |
| 26 | /* Default destructor for displaced_step_copy_insn_closure. */ |
| 27 | |
| 28 | displaced_step_copy_insn_closure::~displaced_step_copy_insn_closure () |
| 29 | = default; |
| 30 | |
| 31 | bool debug_displaced = false; |
| 32 | |
| 33 | static void |
| 34 | show_debug_displaced (struct ui_file *file, int from_tty, |
| 35 | struct cmd_list_element *c, const char *value) |
| 36 | { |
| 37 | fprintf_filtered (file, _("Displace stepping debugging is %s.\n"), value); |
| 38 | } |
| 39 | |
| 40 | void _initialize_displaced_stepping (); |
| 41 | void |
| 42 | _initialize_displaced_stepping () |
| 43 | { |
| 44 | add_setshow_boolean_cmd ("displaced", class_maintenance, |
| 45 | &debug_displaced, _("\ |
| 46 | Set displaced stepping debugging."), _("\ |
| 47 | Show displaced stepping debugging."), _("\ |
| 48 | When non-zero, displaced stepping specific debugging is enabled."), |
| 49 | NULL, |
| 50 | show_debug_displaced, |
| 51 | &setdebuglist, &showdebuglist); |
| 52 | } |