From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EN6tJwDg2mMOhScAWB0awg (envelope-from ) for ; Wed, 01 Feb 2023 16:56:16 -0500 Received: by simark.ca (Postfix, from userid 112) id 9EBEB1E128; Wed, 1 Feb 2023 16:56:16 -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=GGBSGXAY; 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=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=unavailable 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 39D2A1E0D3 for ; Wed, 1 Feb 2023 16:56:16 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 686603858412 for ; Wed, 1 Feb 2023 21:56:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 686603858412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675288575; bh=/Bfxn2OV5rWENLNyhRlKOA89WEGkUEDrXZBrGcGSlCg=; 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=GGBSGXAYYboTD4ESHRmuJ1X/x4VPC1gL84wKl6S/YEuW93CsDEjaWWPMjeYOqrA/h GxAnnqzYmFMsqAR8/jkldKoWovVVTY3jT/U/Au5fRzqKv9EtNV6pdW+oDYzpnV//7B XqOrGc7h93QUsQpluPbWGy+HUCHTnPTNvjPdBSk8= Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id EDAA93858D3C for ; Wed, 1 Feb 2023 21:55:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EDAA93858D3C Received: by mail-ot1-x32c.google.com with SMTP id x26-20020a056830115a00b0068bbc0ee3eeso4774otq.0 for ; Wed, 01 Feb 2023 13:55:55 -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=/Bfxn2OV5rWENLNyhRlKOA89WEGkUEDrXZBrGcGSlCg=; b=rNBPplpbiwURw1gqANEG/QZgEk15dQH+0tMBC7wJR2E6yccGUtOyvSR1o3hBEztipB 89VPfGhZEoK+J433GeGpWE6hkrVnyPsDbTZYvzH7IqCVnUls7+WQh53ZHrRk2cjm/GQ1 M7Fi0/McStn/+lOoxm655LZkSzYKJ+wcektnQ8h5NJ8G1EWn9RtCLcTeVd6m563aWgY2 P0aMN1S1Yjh1Y0G4JPS6sO3kw1JzO3x/oLtVg91eevMkR7KW0VMiZHFbI5MUZ1TyvNkr bv4RXd2Gsb0l7138OSyLkeEfCS1l1jtXG74qtzLR8A6UBPVeOgRsb5U2psfNg76sCoFZ hjEw== X-Gm-Message-State: AO0yUKWfOBJjVLWS3uzaGlXaJYOsIoliPE5lW/fYEtCwyhsq6/efz0jQ uryEs72NDpCvWKOGPV2vlLEj2w== X-Google-Smtp-Source: AK7set8D3oSDWRmIacJiNQfwKTgwzFYdoS/w6xw9rxbqQFkUthV+TX+ALNP/bCdxvslv/qUqs3l8BQ== X-Received: by 2002:a9d:38b:0:b0:670:5c6c:b59e with SMTP id f11-20020a9d038b000000b006705c6cb59emr2156348otf.6.1675288555304; Wed, 01 Feb 2023 13:55:55 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:bd06:52ef:430e:d93c]) by smtp.gmail.com with ESMTPSA id 14-20020a9d048e000000b006864c8043e0sm8266534otm.61.2023.02.01.13.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 13:55:54 -0800 (PST) References: <20230130044518.3322695-1-thiago.bauermann@linaro.org> <20230130044518.3322695-3-thiago.bauermann@linaro.org> <87sffpu04g.fsf@redhat.com> <87lelhkwo7.fsf@linaro.org> <4d0e7fbe-0530-d718-1fd5-a7dba5d1ccf7@simark.ca> User-agent: mu4e 1.8.13; emacs 28.2 To: Simon Marchi Cc: Simon Marchi , 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: <4d0e7fbe-0530-d718-1fd5-a7dba5d1ccf7@simark.ca> Date: Wed, 01 Feb 2023 21:55:51 +0000 Message-ID: <87h6w5kq3c.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: > On 2/1/23 14:33, Thiago Jung Bauermann via Gdb-patches wrote: >> >> 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 > > "of process with PID" sounds weird, syntactically. I would say "of process with pid > PID" (same in the other comments). Otherwise, this is OK. I adopted this wording and pushed this patch as well as patch 1 in this series. Thank you again for your, Andrew's and Luis' reviews on these patches. -- Thiago