From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oRe8GLW+2mPtbycAWB0awg (envelope-from ) for ; Wed, 01 Feb 2023 14:34:13 -0500 Received: by simark.ca (Postfix, from userid 112) id 5643B1E128; Wed, 1 Feb 2023 14:34:13 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=VoWwnk1D; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BD27C1E112 for ; Wed, 1 Feb 2023 14:34:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2E573858422 for ; Wed, 1 Feb 2023 19:34:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2E573858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675280052; bh=xGWts0bzlsw6jz6xZlMlXM7ZlvXCZ7QnikNIJJ9LY9w=; h=References:To:Cc:Subject:In-reply-to:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=VoWwnk1Dv+cUNzyiE2K+AcfSFPBQkz/QUXyYF66C0hPtn1MXz+e/MwqndwIJdHK3H mNKF2QsTns/JYMoUiI42mstf/6qLY1B4wZWYeaI/O/4zrHvJeNfy136TcdLXY4OKwN 3PohRCcx2afbOPvX8mWk6rWkJDGfkOPnePrESqDA= Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by sourceware.org (Postfix) with ESMTPS id 4B8B23858D33 for ; Wed, 1 Feb 2023 19:33:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B8B23858D33 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-1631b928691so24900162fac.11 for ; Wed, 01 Feb 2023 11:33:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xGWts0bzlsw6jz6xZlMlXM7ZlvXCZ7QnikNIJJ9LY9w=; b=v2/h/jz0Q3sMb3s9b5yXPUkubOElaBuPagX5w+Idc4647V2qWKOXbpZHzrsjT9Ct5P iXATGkLrhxLKkoc1POBSEbXrL+ih6LZvi1TrfI72+ChrrZ4e/pb5vzzAnNE5qp7AWVVX Eb0XXCsxJZAf3k5RS+v9UI+AVmsEQmMFMMMm5xZh8gsOnLieqXfHsnhPI9+NOHe+QrYJ Fw8UKtEd2jy3oFlHhVqEGcj+VdOEiB1YWOSY4oYPM8YFk3kHol4DRXr15VgUjCkPkpE9 EOBkSKD2svGQTOJx/4NH/elFwtpkEEzSENJpp9ZS+pyDMnzJfqU9U/Y7SkZzLi2QDULW T3Ng== X-Gm-Message-State: AO0yUKVQNtr0wfCPUNvc42+7flnQpsUL50BHcMBHTg1O5qM8KfC/5iN6 AurDc3H8QUlSvyx0HCInmO6Wyn2Se0OtKJLU X-Google-Smtp-Source: AK7set/W2ATne721Dy9L7o6xNNBQLklZYdlP0B8zVtnOSE+l3G1xT0VxoVCLtrHYhGVbssFuRNYV5Q== X-Received: by 2002:a05:6870:20e:b0:15b:9290:3905 with SMTP id j14-20020a056870020e00b0015b92903905mr1720377oad.42.1675280027264; Wed, 01 Feb 2023 11:33:47 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:bd06:52ef:430e:d93c]) by smtp.gmail.com with ESMTPSA id gr22-20020a056870aa9600b00130d060ce80sm8237019oab.31.2023.02.01.11.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 11:33:46 -0800 (PST) References: <20230130044518.3322695-1-thiago.bauermann@linaro.org> <20230130044518.3322695-3-thiago.bauermann@linaro.org> <87sffpu04g.fsf@redhat.com> User-agent: mu4e 1.8.13; emacs 28.2 To: Simon Marchi Cc: Andrew Burgess , Thiago Jung Bauermann via Gdb-patches Subject: Re: [PATCH v3 2/8] gdbserver: Add PID parameter to linux_get_auxv and linux_get_hwcap In-reply-to: Date: Wed, 01 Feb 2023 19:33:44 +0000 Message-ID: <87lelhkwo7.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain 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: , From: Thiago Jung Bauermann via Gdb-patches Reply-To: Thiago Jung Bauermann Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Simon Marchi writes: >>> @@ -946,17 +946,16 @@ extern int have_ptrace_getregset; >>> *VALP and return 1. If not found or if there is an error, return >>> 0. */ >>> >>> -int linux_get_auxv (int wordsize, CORE_ADDR match, >>> - CORE_ADDR *valp); >>> +int linux_get_auxv (int pid, int wordsize, CORE_ADDR match, CORE_ADDR *valp); >>> >>> /* Fetch the AT_HWCAP entry from the auxv vector, where entries are length >>> WORDSIZE. If no entry was found, return zero. */ >>> >>> -CORE_ADDR linux_get_hwcap (int wordsize); >>> +CORE_ADDR linux_get_hwcap (int pid, int wordsize); >>> >>> /* Fetch the AT_HWCAP2 entry from the auxv vector, where entries are length >>> WORDSIZE. If no entry was found, return zero. */ >>> >>> -CORE_ADDR linux_get_hwcap2 (int wordsize); >>> +CORE_ADDR linux_get_hwcap2 (int pid, int wordsize); >> >> Ideally the comment for these three functions would be updated to >> mention the PID argument. This is how I changed the comments. What do you think? diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index 221de85aa2ee..4f95a27808ba 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -941,20 +941,19 @@ bool thread_db_thread_handle (ptid_t ptid, gdb_byte **handle, int *handle_len); extern int have_ptrace_getregset; -/* Search for the value with type MATCH in the auxv vector with - entries of length WORDSIZE bytes. If found, store the value in - *VALP and return 1. If not found or if there is an error, return - 0. */ +/* Search for the value with type MATCH in the auxv vector, with entries of + length WORDSIZE bytes, of process with PID. If found, store the value + in *VALP and return 1. If not found or if there is an error, return 0. */ int linux_get_auxv (int pid, int wordsize, CORE_ADDR match, CORE_ADDR *valp); /* Fetch the AT_HWCAP entry from the auxv vector, where entries are length - WORDSIZE. If no entry was found, return zero. */ + WORDSIZE, of process with PID. If no entry was found, return zero. */ CORE_ADDR linux_get_hwcap (int pid, int wordsize); /* Fetch the AT_HWCAP2 entry from the auxv vector, where entries are length - WORDSIZE. If no entry was found, return zero. */ + WORDSIZE, of process with PID. If no entry was found, return zero. */ CORE_ADDR linux_get_hwcap2 (int pid, int wordsize); > I think the patch is OK to push after addressing this comment. Thanks! -- Thiago