From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway21.websitewelcome.com (gateway21.websitewelcome.com [192.185.45.91]) by sourceware.org (Postfix) with ESMTPS id 313203858D31 for ; Sun, 19 Apr 2020 01:41:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 313203858D31 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 6F926400C5589 for ; Sat, 18 Apr 2020 20:41:15 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id PyxOjHALW1s2xPyxOjtzbu; Sat, 18 Apr 2020 20:41:15 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xHQbL2hE2q9DyQhdA4YlilXs0UCSLhGXhE/KzkWmhf4=; b=St6QhtafiVw91KlTwBZ/JLKYpf 5LRvWaVCTs7rQ1DyL6z+yGA+uLSW0/mFSoSnYUF2gIVdPYo3wHtAgHB3D5jd7ehx/jhBn9+8UJU2j 20en8SyS/5uhou05WxMBvayUm; Received: from 174-16-123-2.hlrn.qwest.net ([174.16.123.2]:49424 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jPyxO-000aZo-AD; Sat, 18 Apr 2020 19:41:14 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Restore some windows-tdep.c code Date: Sat, 18 Apr 2020 19:41:12 -0600 Message-Id: <20200419014112.22277-1-tom@tromey.com> X-Mailer: git-send-email 2.17.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.123.2 X-Source-L: No X-Exim-ID: 1jPyxO-000aZo-AD X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-123-2.hlrn.qwest.net (bapiya.Home) [174.16.123.2]:49424 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-18.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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:41:25 -0000 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; + } +} + /* 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