From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by sourceware.org (Postfix) with ESMTPS id 173AB3858D32 for ; Sun, 19 Apr 2020 01:43:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 173AB3858D32 Received: by mail-qv1-xf33.google.com with SMTP id y19so2979481qvv.4 for ; Sat, 18 Apr 2020 18:43:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jJAtDx3btcfWxnSIEJGP23+WIAZiZ7afUF1EnNKn5yc=; b=CfWWCxduvpidQJREBJwPX4ZJ/CFV+PLthU/o8V6rfKPd5lBfl617JbihXUwoVNCP09 Akm/CPjO7SAcXCILJ0FUZpIVraQFvLOnWnOq2/ILu90pi0Sxz6SEAR3hO4P55/YWq7k/ Gx1QpMjzxuONWJBi7oexr7s0n5Xfc0/KMf+bdABHkQGjJCzLQ5nrDOCtCdkYl/B+cG5Y Ddx7nxjpqIhwOqQcHFW3s9iZmuBmV7ueaN4ImWR2opFKLFsRR9MwYqWKAI4+Bw0809Qz A+qJGmrniIk1rHR1uHbJli1h1R0AErJGGhgfK/Jsx0cRs+mFyWpc9GgeV0ngscL4LT6V 1rdQ== X-Gm-Message-State: AGi0PubHxNea8U4t3Y0dsGZJfT0AiJcFaxLcoDwAi8GAAMS6dUvq7ILZ 30mzmNp/L53stBgw7npYelNmvCgMMG/73l9rp1kgUT2Z X-Google-Smtp-Source: APiQypKoqwacgHquf8F/2aPvUGDc3XXN7qGUDDx7i/skcrkwR1ufT5b7m7XbKMQvkiA4q3aJ2I4/eXzIFvU/LHhHasc= X-Received: by 2002:a0c:b797:: with SMTP id l23mr8898851qve.204.1587260624280; Sat, 18 Apr 2020 18:43:44 -0700 (PDT) MIME-Version: 1.0 References: <20200419014112.22277-1-tom@tromey.com> In-Reply-To: <20200419014112.22277-1-tom@tromey.com> From: Christian Biesinger Date: Sat, 18 Apr 2020 20:43:31 -0500 Message-ID: Subject: Re: [pushed] Restore some windows-tdep.c code To: Tom Tromey Cc: gdb-patches X-Spam-Status: No, score=-37.6 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 01:43:54 -0000 On Sat, Apr 18, 2020, 20:41 Tom Tromey wrote: > 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 > > * windows-tdep.c (init_w32_command_list) > (w32_prefix_command_valid): Restore. > (_initialize_windows_tdep): Call init_w32_command_list. > --- > gdb/ChangeLog | 6 ++++++ > gdb/windows-tdep.c | 20 ++++++++++++++++---- > 2 files changed, 22 insertions(+), 4 deletions(-) > > 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; > Seems like this could be made a bool. + } > +} > + > /* 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); > -- > 2.17.2 > >