From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f86e6e4038so4741471e87.0 for ; Mon, 26 Jun 2023 15:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; 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 :from:to:cc:subject:date:message-id:reply-to; bh=DcKdWge144ZpxdKswWe76eiIwSpQetXUD6tWailfYhQ=; b=aTvP3bM4KdukUXqAph40cMCgT0Yzi5LRisIEuYoXp6XltaDVUmH6t8ZCopyH9NeJ92 3710kttNuMcEReUIUlqv8R6OYzpWGXFulASRu9tGYyWAXqWyUWBnSFjx4fWuI0xDs9ei AO2WlhNkYjzLXRZjgS+8nFlUkVLEd5/IY/jHjfybL+v3W6jlG9hJqgSUQTG0gqsPYbr+ kxw/DMXpIqRlyltaiMzXkhkuONRfdnEgEM509Aykd7evDGrdKpdtSKvSUKRojLFfmL4S f21PJm2Yo5hN5aCwyOAlJyrH/RtEd+5GtEnE/FJ5DZadM4gDMOGIptXJzE7WBa7/f2W3 J8Sg== 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 From: Simon Farre 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 List-Id: 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".