From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by sourceware.org (Postfix) with ESMTPS id 60C443858D20 for ; Tue, 11 Apr 2023 14:46:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 60C443858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f50.google.com with SMTP id d9so7916984wrb.11 for ; Tue, 11 Apr 2023 07:46:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681224412; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tBc4u/Leit/hQz6MD+eWHFGHDQBeTw4ZG+0XK4lhces=; b=aLn7OgZ82BcW6FB4I/0TDOt5gvIW5uXmIiL2zOzpkSPTKC3zZRQWtaggJWPjro9rt6 LGXHr+9dSOOjF9zB0GIPkkXFIwvgnWmVn2YbKRd0CyqAlrETbtsZbMD14e5NsxSIcoC8 gYchhkrp3Q0ksiQe/5F53VW/M1M9SxKKZnwrOIf2RFIy8d/5VAb+lx9lfvpWAplUk+jT seQPA57zmOTZhuKAsHdqcFmKpYORLt9r+mN47olaLE+WT4WUGpl3Y8u4UfeYdSLtEHn8 BDmT5gg6iRkTF8hOOE/zs6wuLX7Ht3V/UwU7F6Qce5AFURqhhSGr9rWNFmIYc41cWqsm rlIA== X-Gm-Message-State: AAQBX9d6MJoZIzBPhDsqi5xEhNuwLbTcw05GyK4RdiL2dP4CzGpouA++ 4SvyhG58LW/jjLq3recM5u8= X-Google-Smtp-Source: AKy350Z97gr5eJmjHwri3M+0uvNnhC5DMMwlesaPOY6PmdDzTgxioMUaZW9OkkH2uwqqdrKkYdkGPQ== X-Received: by 2002:a5d:6842:0:b0:2d7:9206:488d with SMTP id o2-20020a5d6842000000b002d79206488dmr9379337wrw.36.1681224412084; Tue, 11 Apr 2023 07:46:52 -0700 (PDT) Received: from ?IPv6:2001:8a0:f90a:9800::1fe? ([2001:8a0:f90a:9800::1fe]) by smtp.gmail.com with ESMTPSA id n17-20020adffe11000000b002f0057f6fd8sm7676860wrr.13.2023.04.11.07.46.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Apr 2023 07:46:51 -0700 (PDT) Subject: Re: [PATCH v4 12/13] gdbserver: Read offsets of the XSAVE extended region via CPUID To: John Baldwin , gdb-patches@sourceware.org Cc: Aleksandar Paunovic References: <20230318010905.14294-1-jhb@FreeBSD.org> <20230318010905.14294-13-jhb@FreeBSD.org> From: Pedro Alves Message-ID: <856d374c-9fd4-0db3-2bee-60850604c16a@palves.net> Date: Tue, 11 Apr 2023 15:46:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20230318010905.14294-13-jhb@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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: On 2023-03-18 1:09 a.m., John Baldwin wrote: > SDM recommends to obtain memory offsets values only by calling CPUID > because they can change depending on the CPU mode. I'm not sure what this sentence is saying -- only by calling CPUID, as opposed to doing what instead? Is this saying that consulting CPUID for the host (the machine running gdbserver in this case) returns the correct result even if gdbserver is 64 bit, and the inferior is 32 bit, but that with some other method (but which?) it wouldn't?