From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mm6yMU/CYGYAlScAWB0awg (envelope-from ) for ; Wed, 05 Jun 2024 15:53:51 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IGRnqkNk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id BA2C91E0C0; Wed, 5 Jun 2024 15:53:51 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 888431E030 for ; Wed, 5 Jun 2024 15:53:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 24DC4398E949 for ; Wed, 5 Jun 2024 19:53:49 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AD1A83858289 for ; Wed, 5 Jun 2024 19:53:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD1A83858289 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AD1A83858289 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717617207; cv=none; b=r8ajFcyTC2AyyjKZWcBOGdRB3znqPw2n0tlr5doRFBNPw2s8rOLitofpYybDdoRvYdK0+JQsyfB9MyOoD3HMlvkjLOpWYXWkowWpN4cURH1ur2zJ0ZIMXHXG1O4r4EgFZgtkH39hKCkHpzO/SJpEq4yKYrDHWMf6/7FfUoWCfK8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717617207; c=relaxed/simple; bh=zHTvjNJS515IIztUBQHdhq+pc6jGN7OPr3UVi9WQiw8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=L62djZVj62QahBIXbn+fjwnftP9sM+u7HQMUWpKykWNPd9lpvv+H/x251L6UoIslURSwudb1HSctpnm1oq69cTx3l1eo74nzkdRHfajBvRzJUjRYZl1dw5KQVOd6v8Ec20nJv/Fc4kwAh+y6EH3FYjRPPIH4CwYXHb5zcwjn5l0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717617205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H7faNjEQns5YwSJDuZvQVloR0q6LkkT0p41TkbvhEjc=; b=IGRnqkNkvwf9BCnbF2OveVXyBbRU7yhxKe6pYszrUtfJFFP5bE2PNITsNQigSc7hFgp1Yg 7hzoip2s7vV08Rs3Y3dn6SvCOWwpG5XPGXM6heMrodKTrd++MBXlB7OU4Sf+gkIzZwK445 tbmbZSprfaRB9iQz2tvscr+gsu8iLbg= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-350-gdImH7nEPBCnjikNwrHVBQ-1; Wed, 05 Jun 2024 15:53:24 -0400 X-MC-Unique: gdImH7nEPBCnjikNwrHVBQ-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-6ae48f8f33bso1627646d6.1 for ; Wed, 05 Jun 2024 12:53:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717617203; x=1718222003; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H7faNjEQns5YwSJDuZvQVloR0q6LkkT0p41TkbvhEjc=; b=S/Xgt00TReuRxQaY56aOs6J/OpCr1A2btA1SX2aLccJMgLjsGdhyFGLvsxNS2qmAkz SbinHuyWZaEsOOpV2xk0AjhCdsvWRp4DESbkoizC+bznme1Z3P3IHVW0+X+SlEXzEfCW NDpd9TF1EaPDvjx90qWNuD7auFW1p3xjFrjr6OEmy3ZE+LMOBtJkAFbPnsTGcu3NKE69 71driMx5vkXekwsec+ZBM6YL70u9Tw+fZgBylexgdA8bxBWq4VsYudsnfRiHuYJ7RVxP LWhodAtStOMbohoexy+Gnq5bQGPJhi053fmc2htT6LBHVVh/G7/ZBMVXSSmzjAFQ6KRJ HN0w== X-Gm-Message-State: AOJu0Yxr5oLPmYGaJ0NKhfbZ6PjKk9KI89GscBIZdnAr07PdLiTCeQRD qBlScdWG4oBJEXTwSshkYE3Gq496xTQdb7BLH2I7psM66NrmKWNu7sjoBa/IkKeucy460xGPHI8 2ftsoaLw8JFFXelEx2rULQdiOd7BHyZR711SL0Ih74eC/JGWtPIU5+GgoJiU= X-Received: by 2002:a05:6214:458f:b0:6af:bcb0:c29c with SMTP id 6a1803df08f44-6b02bf0999bmr37948306d6.10.1717617202985; Wed, 05 Jun 2024 12:53:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcwqGn1Rwz8+8xuMxGQn7QiRBYvdaJbVYxSA/ec+FPTHsIHAVIHN2dqYj84BMqpqZi4uso2g== X-Received: by 2002:a05:6214:458f:b0:6af:bcb0:c29c with SMTP id 6a1803df08f44-6b02bf0999bmr37948206d6.10.1717617202685; Wed, 05 Jun 2024 12:53:22 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:92c5::1001? ([2804:14d:8084:92c5::1001]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b004d94d7esm10214956d6.65.2024.06.05.12.53.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jun 2024 12:53:22 -0700 (PDT) Message-ID: <811d838c-ef3b-4bcf-bbad-69c406503aa3@redhat.com> Date: Wed, 5 Jun 2024 16:53:19 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] gdb/record: add support to vmovd and vmovq instructions From: Guinevere Larsen To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20240521202800.2865871-1-blarsen@redhat.com> <20240521202800.2865871-3-blarsen@redhat.com> <87msnznzag.fsf@tromey.com> <736a096d-91bb-4787-b628-c273f7e91c78@redhat.com> In-Reply-To: <736a096d-91bb-4787-b628-c273f7e91c78@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On 6/5/24 15:24, Guinevere Larsen wrote: > On 6/5/24 13:13, Tom Tromey wrote: >>>>>>> "Guinevere" == Guinevere Larsen writes: >> Guinevere> This commit adds support to the x86_64 AVX instructions >> vmovd and vmovq. >> Guinevere> The programmers manuals for Intel and AMD describe these 2 >> instructions >> Guinevere> as being almost the same, but my local testing, using gcc >> 13.2 on Fedora >> Guinevere> 39, showed several differences and inconsistencies. >> >> Guinevere>  static bool >> Guinevere> -i386_record_vex (struct i386_record_s *ir, uint8_t rex_w, >> uint8_t rex_r, >> Guinevere> +i386_record_vex (struct i386_record_s *ir, uint8_t vex_w, >> uint8_t vex_r, >> Guinevere>           int opcode, struct gdbarch *gdbarch) >> Guinevere>  { >> ... >> Guinevere> +    error ("Unrecognized VEX.PP value %d at address %s.", >> Guinevere> +           ir->pp, paddress(gdbarch, ir->orig_addr)); >> >> I don't know anything about record, really, but it seems weird to have a >> function that has two error return mechanisms -- either calling error or >> printing a message and returning some value: >> >> Guinevere>      default: >> Guinevere>        gdb_printf (gdb_stderr, >> Guinevere>            _("Process record does not support VEX >> instruction 0x%02x " >> >> What's the deal with that? > > Christmas vacation in between, mostly. > > gdb_printf is what i386_process_record already uses, so felt > reasonable, then I chose "error" int the other situation because it > felt more appropriate for me to have a strong error when we find > something that, to the best of my knowledge, breaks the ISA. To me it > marks a difference between "we're not equipped to handle" versus "up > to most recent ISA, this is straight up incorrect", but if you think > it's better to only use one error mechanism, I can switch to > gdb_printf everywhere. > Interestingly enough, I just double checked what happens, and for the end user, the gdb_printf option looks stronger because gdbarch will add > Process record: failed to record execution log. and error will not print anything but the message given. I'll standardize on the gdb_printf version instead.  Thanks for the pointer! -- Cheers, Guinevere Larsen She/Her/Hers