From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bI21CxsNmmTQ7g4AWB0awg (envelope-from ) for ; Mon, 26 Jun 2023 18:11:39 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=e5Szl7Az; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2137B1E0BB; Mon, 26 Jun 2023 18:11:39 -0400 (EDT) Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0C4121E0AC for ; Mon, 26 Jun 2023 18:11:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4285E3858D33 for ; Mon, 26 Jun 2023 22:11:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4285E3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687817496; bh=DcKdWge144ZpxdKswWe76eiIwSpQetXUD6tWailfYhQ=; h=Date:Subject:To:References:Cc:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=e5Szl7AzrQd8eM+OBwoeuTD6hFl5EyluPMjW7DTY/Qw4TE1I8rlEbF7Y+6xdo9yNF xNAE7qAKkHvOC51T/cNczDST1zsA9P4lmF1AC+ijHa5dUs2CLZak3IkzqWdH5WF1E1 sCpfYMibI1bk+S1GdH4eCy4fT+2EIUzwj8x5spAw= Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 17B1A3858D1E for ; Mon, 26 Jun 2023 22:11:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17B1A3858D1E Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f86e6e4038so4741471e87.0 for ; Mon, 26 Jun 2023 15:11:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817475; x=1690409475; h=content-transfer-encoding:in-reply-to:from:cc:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DcKdWge144ZpxdKswWe76eiIwSpQetXUD6tWailfYhQ=; b=MBrHw43dPyOSasD8aEjSreGE4g3FvXfPrMJGEsM2iQHDCg5eEd6N6wT+QOb+eRY3hc KCsJ+3Dr8hee9URWK+WKTcuv1q9//OSQAdriIOsuHDzM4Vl+UhZfR0b14xd92QrCIcQe RFGawpnomuWvH9jRWKPr16hEG8Pg0yIjMy1Lm7/wRENakpxxG6ov5JZkYXcnK4eXFveb H2Rc5jCZZVuC7bjTiXfO1R5Nd3xzZ7wIQomkXIQsOpVv/n59iVizLNNJTr2bZSbGw/m4 t/Iyh/HevHJC6u1JCEBhL5ArWzXE2hA5yPHFim2ZFNNy1GZbiPH//9hryflQO7PIzCZ1 C7EQ== X-Gm-Message-State: AC+VfDy7TKWTYw1NKvDDPDIe8B5/OFV6+Ti81xKSfgrzPPrd8u77KVCu 9LgHk8rHn34JGvmH5iqO8e+zxiCyjss= X-Google-Smtp-Source: ACHHUZ4Rs+u5gD6RgSHjnvnXYIKQ9YA8vlVCiE0Byt9LMnL26eX6EMDi06CxdWGo5PfalqDO76cnxA== X-Received: by 2002:a05:6512:10cc:b0:4fb:7371:3db6 with SMTP id k12-20020a05651210cc00b004fb73713db6mr1539345lfg.29.1687817475317; Mon, 26 Jun 2023 15:11:15 -0700 (PDT) Received: from [192.168.1.20] (78-73-77-63-no2450.tbcn.telia.com. [78.73.77.63]) by smtp.gmail.com with ESMTPSA id t5-20020ac243a5000000b004eb44c2ab6bsm1277753lfl.294.2023.06.26.15.11.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jun 2023 15:11:14 -0700 (PDT) Message-ID: <2c7beaa5-a45c-b97a-a4d8-44a092a00471@gmail.com> Date: Tue, 27 Jun 2023 00:11:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v1] gdb/DAP Fix disassemble bug Content-Language: en-US To: Tom Tromey References: <20230626161654.207687-1-simon.farre.cx@gmail.com> <87cz1ixecl.fsf@tromey.com> Cc: gdb-patches@sourceware.org In-Reply-To: <87cz1ixecl.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Farre via Gdb-patches Reply-To: Simon Farre Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Also, I don't know what design GDB has, but this kind of information is probably knowable by utilizing DWARF. Just guessing here, but it seems like if one were to use the line number program in dwarf, being able to "disassemble backwards" should be fairly easy. That kind of would have to require that the current design is suitable for that and the little I've looked at it I don't think this is the case, unfortunately. I'll update the patch by just returning "invalid values" prior to the "current pc".