From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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-oa1-x2a.google.com with SMTP id 586e51a60fabf-1631b928691so24900162fac.11 for ; Wed, 01 Feb 2023 11:33:48 -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=xGWts0bzlsw6jz6xZlMlXM7ZlvXCZ7QnikNIJJ9LY9w=; b=srVv0vhrXmu8uMZbQT6gSS7OatofcnaJfEeTv+1I+Qi3fWTd2oj5feEFs/SGK7lBfL 8VShOsOyBu5seZiUud7lPwBkk07X+snW1rAhOjTNo/5bx9HYvpTUW2rd4PrgNSG/iOUU u4bzHYcgdtSFFtiqX+42CA1zuk+Ho1gWcF4zZdTtcr8YVkijRwix6tf+lZn81ose/yII RN6ofmYmGLIzYoIAdaSJaVPAp29bMmKyZiHCMmEedwGXendpl0a4zAa1upPsWZ8tj4V+ JYUA9GM++IDFesHAY+cWp767GlPZK0BJzk5xZ5zbyI6W7TW84BaZJ0qNZG/HY8/o0he5 nCnQ== 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 From: Thiago Jung Bauermann 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-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: >>> @@ -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