From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 0588A3857C44 for ; Fri, 21 May 2021 08:57:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0588A3857C44 Received: by mail-pg1-x534.google.com with SMTP id l70so13730196pga.1 for ; Fri, 21 May 2021 01:57:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vfXp+l1fH215z4G+gQd5hzrWAEXsekDiG61QjF1DRos=; b=IL6aZTiiDfz5Yg1ZdMazeXmeQyqI0SFxts0ghXCHrazu4Z6qe57DXuSmdHq2SwDagl Pgqnj6NQ2hle7EmIJ0IM5/xowWq4lzt2//IL0HR/QZw2utLXsdocEZkHZkivaQ7UdX3K HRAkc0hUGYlXbA8r9ByQnnESz3tkfSP9AFLayxudBgnWY66rZgfhxnVMqW3FS7W5kt+n 42AncA/fDXklczox+qmK7eQ6jx7oa+kW79D6IKppADY0/8Wt5p9BXN3UJzYBI6if7xjL pYO3R4ObxA/9iHEa0a45TNNaDJ4B2A2suzJd/hvwuF/oyhbl7Oecv5dcozAPN6ofe6mO mx9w== X-Gm-Message-State: AOAM5332Je12sjzv144YxpazZ6pRp4WVPlqodJslNWhVb3SF7JRlZC8x MytTY00uPRw9tc1y0IGWY2UDqrAurA6RGKE6SZAE+P5HKYk= X-Google-Smtp-Source: ABdhPJz06N9iMOMBGFjfADUnjMWa9RDPbo7qfCbM/OkurNHdZFmmA0Iy/YMkfrgGfbla3LuCgwtmksMGcHeGWw+kyIs= X-Received: by 2002:a63:b907:: with SMTP id z7mr8647520pge.112.1621587447017; Fri, 21 May 2021 01:57:27 -0700 (PDT) MIME-Version: 1.0 From: vaibhav kurhe Date: Fri, 21 May 2021 14:27:15 +0530 Message-ID: Subject: GDB | DWARF expression | Extracting a range of bits from an 'xmm' register To: gdb@sourceware.org X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2021 08:57:29 -0000 Hello all, For a use case, I am trying to build a DWARF expression which represents the value of an arbitrary range of bits (e.g. 96-127 bits) in an *128-bit xmm register* to be used as a *location attribute value* for a variable DIE. I am using GDB to consume the debug info and test it. Following is the expression I started with to test out a shift operation on an 128-bit xmm0 register using Typed DWARF stack :- *"DW_OP_GNU_regval_type: 21 (xmm0) <0x30>; DW_OP_GNU_const_type: <0x30> 16 byte block: 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; DW_OP_shl; DW_OP_stack_value"* But, while testing it in GDB, I got an error :- *"That operation is not available on integers of more than 8 bytes."* Could you please provide any suggestions/pointers on this? Am I missing something? Please let me know, if you need any additional info. Thanks & Regards, Vaibhav