From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110135 invoked by alias); 14 Nov 2019 16:58:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 110123 invoked by uid 89); 14 Nov 2019 16:58:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=unavailable version=3.3.1 spammy= X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.200.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Nov 2019 16:58:34 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 084FE4E7D66AB for ; Thu, 14 Nov 2019 10:07:20 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id VIRpizt97OdBHVIRpiEliL; Thu, 14 Nov 2019 10:58:21 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9vfBzQ//aY8sC5HMj4vuguYTg7zm4CFadWrAgj4S4nE=; b=rPkLhyAXkoCadwvNGXlRj4WNjH Vir2ZTckuFNoxGwPPeKMFXzD3H7Hl469OjI7sFRhDyOxz0t1QTvPd0Cv/e6O6txt+eKhvjDF/pwCk 3+OT0ZPPjhbH4IY9XMdvbdoQb; Received: from 174-29-59-178.hlrn.qwest.net ([174.29.59.178]:35382 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iVIRp-0017NB-1l; Thu, 14 Nov 2019 09:58:21 -0700 From: Tom Tromey To: Eli Zaretskii Cc: tromey@sourceware.org, gdb-patches@sourceware.org Subject: Re: [review] Report GetLastError value when DebugActiveProcess fails References: <83r22a4cwj.fsf@gnu.org> Date: Thu, 14 Nov 2019 16:58:00 -0000 In-Reply-To: <83r22a4cwj.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Nov 2019 18:54:04 +0200") Message-ID: <87sgmq1jkk.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-11/txt/msg00396.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: >> Date: Thu, 14 Nov 2019 11:40:58 -0500 >> From: "Tom Tromey (Code Review)" >> >> --- a/gdb/windows-nat.c >> +++ b/gdb/windows-nat.c >> @@ -1983,7 +1983,8 @@ >> #endif >> >> if (!ok) >> - error (_("Can't attach to process.")); >> + error (_("Can't attach to process %u (error %u)"), >> + (unsigned) pid, (unsigned) GetLastError ()); Eli> Why not show the text that corresponds to the error code? A lone code Eli> is not very descriptive, IME. I plan to do that in the future. I didn't do it yet because there's no convenient way to do it (there's a helper function in gdbserver but not gdb; but maybe we're going to use some gnulib thing instead?); and because doing a good job would mean fixing all such calls in windows-nat.c. Meanwhile, I needed this one. Tom