From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 9FF313858C54 for ; Wed, 24 May 2023 08:18:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9FF313858C54 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-x134.google.com with SMTP id 2adb3069b0e04-4f3b39cea1eso546604e87.3 for ; Wed, 24 May 2023 01:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684916315; x=1687508315; h=in-reply-to:from:cc:content-language:references:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=hTnkFFYC1lp71qJ9FcBrqnibCpNDSQFJAk1dUup3rYw=; b=QUR9KKlXgsOWoRiOGLDpwDq/G/683NLn5Q36tX6upsWrMhJj2bWi/wRYW5IV7THEFt 6+NXhtLxOw45UMcCD/bWhX/W4ANx0iHPxkyQfadYExt1n48mLyizl/LLZlKSVaN8ES+W SAhsxErcLSe5jTrRQECmqShdOLtYLWeufFTCmmkU0G6wcqYBYgvaJ34w42ksBO3LUyQy XAlNpkfWhJmO/lpMfZLc6mV+vezI/IijRx2lOEKFH8uaMbTua7scDGZ5sUcaAD98awNg 1gkxtXXNoy6Rza1wKcxVe6SiRMKm9QSd+TWZdXRfG1N6XFb0b2Mmt1kXf2QZVjyQw/FC sUaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684916315; x=1687508315; h=in-reply-to:from:cc:content-language:references:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hTnkFFYC1lp71qJ9FcBrqnibCpNDSQFJAk1dUup3rYw=; b=F/hf4Znhsjc/xwzzzdKTheVzYMImZ/mw9kk5xrIXNBllO9jd7cFSaVDMDmhkr7BD6E stqo7G/JXPHELXexHP4m74LnGi5cZRWxPiqAmbvAnbhC3JbCHjuJjZMP/8HHXEe+EjIU 0RWPHXLjXtgnAWh9VdN4j4zeWv78l5oWBy0K/rqnjsznykOAzzCM4O3u3qt+wjaRlVH4 BLOXClh6foV3pjsM7ZXPtpCZmGs5LN5A7R5Xw4ETqY2JoBeTqOp6YhFX410aIdNcWi6l ot5JH7UMQdf+5VHi9hDP+sM34vzRi8rVXONxks9V3mv89p6Y9Se128UB9G5oiiJoV7Lo tY9g== X-Gm-Message-State: AC+VfDxNXZwP9DTiqKnFQZgNl0Q+OpVrTiJJUu+Gb4PnNQCdFadpgCXA A29LR5b6WEsACv7QyU0aNyxalMnIbcbl4w== X-Google-Smtp-Source: ACHHUZ40lBGlIDN3yY/ONxonoqPH4yjIUQkfw0onox+xu2++Py40em1AanPzSqhKcnqpaIRxGovj8w== X-Received: by 2002:ac2:4c96:0:b0:4f4:c30f:fafd with SMTP id d22-20020ac24c96000000b004f4c30ffafdmr1258715lfl.28.1684916314712; Wed, 24 May 2023 01:18:34 -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 u22-20020ac243d6000000b004f021ce4c68sm1645134lfl.80.2023.05.24.01.18.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 May 2023 01:18:34 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------eFguJpOjNZsga6N7QXRRkh09" Message-ID: Date: Wed, 24 May 2023 10:18:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v1] [gdb/infcmd]: Add next-expression command To: Eli Zaretskii References: <20230516094711.57265-1-simon.farre.cx@gmail.com> <83v8gsz4mm.fsf@gnu.org> <83v8gpvp0j.fsf@gnu.org> Content-Language: en-US Cc: gdb-patches@sourceware.org From: Simon Farre In-Reply-To: <83v8gpvp0j.fsf@gnu.org> X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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: This is a multi-part message in MIME format. --------------eFguJpOjNZsga6N7QXRRkh09 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > The "source-level" part is clear, but what about "stepping to > columns"? The command steps by expressions, not by columns. Well, the column metadata is essentially emitted for expressions and statements (or "logical breakpoint locations"), but the actual meta data that is recorded is by column (and a statement flag), so we can't really be _entirely_ sure that what we're stepping to is an expression or statement, even though that is what it's /intended/ to represent. Which is why I used column and expression interchangeably. Perhaps further explanation is required here, or possibly even renaming the feature to `next-column` and `step-column` for the two variants that I've implemented; where the `step` variant behaves similarly to what the normal step/next counterparts do; i.e. if there's an inline frame on the same source file (like a lambda or callback) then step will step into it, whereas next will step over it. The 2 variants will be in the upcoming v3. > There's no need for too much detail, if this is an old feature. Just > say something like > > The support for expressions was added to DWARF2 30 years ago, so any > compiler which emits DWARF2 debug info should nowadays produce the > information required by this command. E.g., GCC supports this since > version . > > (Assuming it is true that every compiler released reasonably recently > will produce this as part of DWARF debug info.) Right, I've only tested with the latest, but I'm pretty sure that the last 4-5 years of compilers at least emit column meta data. I've tested gcc-12, clang-14 and the latest rustc compiler (I know rustc has emitted it for at _least_ 5 years). I'm building gcc-8 (5+ years) as I write this and will test that. Where in the manual would you like me to put the above paragraph? Together with the documentation of the command or somewhere else? And the same question goes for > We need to explain in the manual that the "columns" actually are (or > are likely to be) byte offsets from the beginning of the source line. --------------eFguJpOjNZsga6N7QXRRkh09--