public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Restore some windows-tdep.c code Date: Sun, 19 Apr 2020 01:41:28 +0000 (GMT) [thread overview] Message-ID: <20200419014128.DDCBF3858D36@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=45e1f031e823abf0fb233b3da6da099417e65bd8 commit 45e1f031e823abf0fb233b3da6da099417e65bd8 Author: Tom Tromey <tom@tromey.com> Date: Sat Apr 18 19:28:13 2020 -0600 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. Diff: --- gdb/ChangeLog | 6 ++++++ gdb/windows-tdep.c | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7078129fe7c..366b7c087fd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c index 4af797f9469..e2b7960829f 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);
reply other threads:[~2020-04-19 1:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200419014128.DDCBF3858D36@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).