diff options
author | Tom Tromey <tom@tromey.com> | 2020-04-18 19:28:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-04-18 19:40:52 -0600 |
commit | 45e1f031e823abf0fb233b3da6da099417e65bd8 (patch) | |
tree | e5861c88db426b63b9831a7de3867fe7ffb1b7a0 | |
parent | 13d43873d869d4125a79532889e8a8870cb015d7 (diff) | |
download | gdb-45e1f031e823abf0fb233b3da6da099417e65bd8.zip gdb-45e1f031e823abf0fb233b3da6da099417e65bd8.tar.gz gdb-45e1f031e823abf0fb233b3da6da099417e65bd8.tar.bz2 |
Restore some windows-tdep.c code
When I removed init_w32_command_list, I weirdly neglected to see if it
was called anywhere else. This patch restores the function, which is
called from windows-nat.c. Sorry about the breakage.
Is it possible to have a windows-native gdb that isn't also using
windows-tdep?
Anyway, I'm checking this in.
gdb/ChangeLog
2020-04-18 Tom Tromey <tom@tromey.com>
* windows-tdep.c (init_w32_command_list)
(w32_prefix_command_valid): Restore.
(_initialize_windows_tdep): Call init_w32_command_list.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/windows-tdep.c | 20 |
2 files changed, 22 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7078129..366b7c0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2020-04-18 Tom Tromey <tom@tromey.com> + * windows-tdep.c (init_w32_command_list) + (w32_prefix_command_valid): Restore. + (_initialize_windows_tdep): Call init_w32_command_list. + +2020-04-18 Tom Tromey <tom@tromey.com> + * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update. * value.c (value_fn_field): Update. * valops.c (find_function_in_inferior) diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c index 4af797f..e2b7960 100644 --- a/gdb/windows-tdep.c +++ b/gdb/windows-tdep.c @@ -602,6 +602,21 @@ show_maint_show_all_tib (struct ui_file *file, int from_tty, "Thread Information Block is %s.\n"), value); } + +static int w32_prefix_command_valid = 0; +void +init_w32_command_list (void) +{ + if (!w32_prefix_command_valid) + { + add_basic_prefix_cmd + ("w32", class_info, + _("Print information specific to Win32 debugging."), + &info_w32_cmdlist, "info w32 ", 0, &infolist); + w32_prefix_command_valid = 1; + } +} + /* Implementation of `gdbarch_gdb_signal_to_target' for Windows. */ static int @@ -1077,10 +1092,7 @@ _initialize_windows_tdep () windows_gdbarch_data_handle = gdbarch_data_register_post_init (init_windows_gdbarch_data); - add_basic_prefix_cmd ("w32", class_info, - _("Print information specific to Win32 debugging."), - &info_w32_cmdlist, "info w32 ", 0, &infolist); - + init_w32_command_list (); add_cmd ("thread-information-block", class_info, display_tib, _("Display thread information block."), &info_w32_cmdlist); |