From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x32c.google.com with SMTP id x26-20020a056830115a00b0068bbc0ee3eeso4774otq.0 for ; Wed, 01 Feb 2023 13:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=/Bfxn2OV5rWENLNyhRlKOA89WEGkUEDrXZBrGcGSlCg=; b=jqEHQpyKxKqpt61rWPDyCJ+bTu2I4YUHAvidzFS2Hgvi0k4nz2O3TfQreRg6EYbQBF zB561alUAgiVecFNeZ5eLdv8Z48MgmFl2FXy/XwOVUxh5yFwaaiZHKk5fOsVm0NSMi7s bMtW0ScqqI8ammsKYWxKOmUTJTMKyYIsp+U6z9Vq/3dHTnPlx8U5Dtwm18U8B0utKegk 2MM6iOVkpvhIhMPKlhHv50D0XeqqyOcYUIHzpJmGS+W4hA9+Hn+6JE3BwStZoMuN/Mto LofEcYGPiN6U7uJeLH/ESBHXFA8FxFlSwdbZKUd/QFlQ+v0Q/eXDjEAu26s038rEDIs7 8mAw== 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 From: Thiago Jung Bauermann 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-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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