From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id B4B6A385770A for ; Wed, 24 May 2023 16:01:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B4B6A385770A 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-x12d.google.com with SMTP id 2adb3069b0e04-4f3ba703b67so1132581e87.1 for ; Wed, 24 May 2023 09:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684944081; x=1687536081; h=in-reply-to:cc:from:references:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=NRsWk9cReBDhZwdqwbRX5W89S3EVlqPXlu1HkUmgUzo=; b=NzbxD5R9Q/0W5+kgRgrRkj8tgkqskpB2JkY2Zf1qEagnYjdw3qHPnYahPtWQNYO+y6 UPGClRIRadH+HfOV7fQ8yez6sXy/TxlGWPVSq/ugMynNX9XuxzxnncT7jaUr7pI4wtJg QPf6m5lyrAhUMOQIRFerVsiCx0ZImeW4yXmAhojtcfgadCBcO+CRoWVz6ryK84+sSkjR z14Bo2yK7E1IRKxaJ2o1C7hmwv9yeHiKum2WtAMyqscmy/gDnZLPlAPTEHOtg6osWyzB x5ig6DRpzSR7IsB+w2Fm4aMBNgPCLeJyiMuywqgVpJzOtiVP1lPU5R28gHq969J0Iu1X qHPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684944081; x=1687536081; h=in-reply-to:cc:from: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=NRsWk9cReBDhZwdqwbRX5W89S3EVlqPXlu1HkUmgUzo=; b=W69cZMcnhQulsuZlIgtQNPXq56kJaqpNdbNbAjZ38nRX4TGuIzxNWyl7yvWr25lmTL +SSqm1ri6cnR/M/idsYyHOZBF2zY8/zc98mvqbPJ/x4gntIZkLRsxWfnVhX6Nbaff/RI nuXl+9BMMwfOlSfb+yZgFaC2A6gj214wQ2aWaAV3sVBG5EhPwtZ+o3PeUpLTqd0ZHzhF prVuEWlMVn+E1Y35Z95JCrO2OInrH6CRZmcb6uAvE/HMZd50T0RZ3uwontPOLcQQApVl OZ6tIetom964Prg8KHItXdelcuhmjBrPdZ4BP4lAdIIa9VgaIjeBFGJlrCmGRyUeT1QG GYqA== X-Gm-Message-State: AC+VfDylPr7qVJw6TqLniWRhMNN+07A7aB6eUQBliQy7YQWmSMTdqLUL GAEeuKsoW6mEO9He4yYWmhXEsmNg6TR8tg== X-Google-Smtp-Source: ACHHUZ6QRSIwsP8utCmzfd5sShrpng45biJS8ruCI+x0iPRxbVtBdIhRyTj2LOVrUAo8mHBpJLmz2A== X-Received: by 2002:ac2:46c5:0:b0:4f1:48f7:63f9 with SMTP id p5-20020ac246c5000000b004f148f763f9mr5266111lfo.33.1684944080695; Wed, 24 May 2023 09:01:20 -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 y23-20020a197517000000b004f2794dcb4asm1750506lfe.255.2023.05.24.09.01.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 May 2023 09:01:20 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------Y60Cs31xFfSuzZJ0HMKAr6UQ" Message-ID: <3161ca62-42f4-9bd8-4f8a-533f9f84aa24@gmail.com> Date: Wed, 24 May 2023 18:01:19 +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 Content-Language: en-US To: Eli Zaretskii References: <20230516094711.57265-1-simon.farre.cx@gmail.com> <83v8gsz4mm.fsf@gnu.org> <83v8gpvp0j.fsf@gnu.org> <83fs7mnfqc.fsf@gnu.org> From: Simon Farre Cc: gdb-patches@sourceware.org In-Reply-To: <83fs7mnfqc.fsf@gnu.org> 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,HTML_MESSAGE,KAM_SHORT,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. --------------Y60Cs31xFfSuzZJ0HMKAr6UQ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > AFAIU, the fact that the metadata is defined in terms of columns is an > implementation detail of no particular interest to GDB users. On the > user level, this is supposed to step by expressions, is that right? > > Perhaps, to avoid too many miscommunications, you could point me to > the relevant description in the DWARF2 spec, so I could read it, and > then we could talk based on the same information? Unfortunately the spec is not too descriptive, it isn't until recent years (probably in the last ten-ish) that people (compilers/languages) has gotten around to understanding the point of the "Line Number Program", that records the line & column meta data, particulary when it comes to the column meta data. There's a new proposal for further extending the LNP that discusses it some what more in depth and /perhaps/ that will give you some insight, it can be found here: https://dwarfstd.org/issues/140906.1.html (it was provided to me by jemarch after discussion on the IRC channel) Otherwise, the "Line Number Program" can be read about in the latest (as well as earlier) specs: https://dwarfstd.org/doc/DWARF5.pdf under the chapter "6. Other Debugging Information" (specifically 6.2, the Line Number Program). But it won't explain much to you on how this is used by compilers. The DWARF2-5 specs are of few words when it comes to columns, so one has to resort to "3rd party" (the proposal link, above) to get any explanations of what compilers actually do (or should do) but as previously said, GCC, Clang, and Rust all does it, though GCC emits somewhat faulty column meta data, see the issue I've filed on bugzilla for GCC after discussions on the GDB irc channel: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109902 The best description of what the column meta data is meant to do, is serve as "logical breakpoint locations" on a source code line; this includes statements and expressions - though it's never _explicitly_ worded like that in the spec (unfortunately, DWARF is not as meticulous with it's documentation and describing the point of certain aspects of the spec, as "we are", here in the GDB community). Regards, Simon --------------Y60Cs31xFfSuzZJ0HMKAr6UQ--