From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by sourceware.org (Postfix) with ESMTPS id EFEB73858D33 for ; Thu, 4 May 2023 14:21:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EFEB73858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-76372a83c8eso9585439f.3 for ; Thu, 04 May 2023 07:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1683210084; x=1685802084; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:from:to:cc:subject:date:message-id:reply-to; bh=kZW+MFyXOGw/kyWAhUyNLPtXl0gSpEV8rf5WYieCnWc=; b=U/P9AnXSSM1pRD5VoUe+cuozXG6ZhnjSW3SMvetmhypaIuFcNzdLvdfAlV78N/reyu X97lEWwSsq0XZ3ivEowD+kJWKW8Kwx+Jkr/0niakvtr9ysD5p9y6WDJ1kCogCYZIZlyI ppxlHHUUWWL7kcRJ6qYnJ5IU/dxdoRvR+NbvaM2TOADsmjOXEOsE7GB9PDKFyPp04M3s Vu7ReFPH3Zq8WfULxEH6M+H+6X4e/lUZuMVyiHH8MypUYLW7t4XSVlqQoFU1EvvyMG3C atQ6lL6jCPpM2xMsuDKIbw+PAQsUDPodwjMBs66B79Z49XuXx54rR8TnszATM0m9Ugnl TC1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683210084; x=1685802084; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kZW+MFyXOGw/kyWAhUyNLPtXl0gSpEV8rf5WYieCnWc=; b=XCfqVahjt+NTudxfrHZuZCAuWWnXRp/VNWQOpZWdLNbI/JSEI94UJ6TZkC7iKpnTHy ejaWmAuEeBzF+e4OX3lSJ6prRCKI/ERYlbDbZLRFdEiLNwEK6vwwLznQNGeP3Ltq6yVI IYNteHRFSs2E2A4DpuO4n2WJec7qJGwChcYgFogR6Pa+v4MKxD+CJ5hdEuJ3q3xc4QSi L3WWjF4U6ttfTA3/DyDGIc/aFP+4SkyTLOWdw7cIfYzgCK66t434nhJinPWzoS03XdQ5 5eCgGOE1PFtYmAK6iY+dKX6SQPASqvHmbIsuJu/Sg/I9v24nMAwFciXjpJglwbmWMwyl hThA== X-Gm-Message-State: AC+VfDyIke1/FXYpe0vTnJd/XOpJ1UZNvY0HH0JZSm1+oWWsv8WdvSsk mWpXLOJVa4Qo3l1k9Vy72K7PZlC4rZEVYSZxhWRHQw== X-Google-Smtp-Source: ACHHUZ7U7vPL2lIGtG+0RGJfBG6c8ENlBVW1pqKCtf1H+0lUe7jMuOmshIj6GzdTqPMQOASLJ5G2sA== X-Received: by 2002:a5e:890d:0:b0:74c:8cec:548e with SMTP id k13-20020a5e890d000000b0074c8cec548emr16394896ioj.4.1683210083907; Thu, 04 May 2023 07:21:23 -0700 (PDT) Received: from localhost.localdomain (71-211-191-82.hlrn.qwest.net. [71.211.191.82]) by smtp.gmail.com with ESMTPSA id r16-20020a6b4410000000b00760a07e4e09sm9983384ioa.5.2023.05.04.07.21.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 07:21:23 -0700 (PDT) From: Tom Tromey Subject: [PATCH 00/11] Fix frame-less expression evaluation in DAP Date: Thu, 04 May 2023 08:21:21 -0600 Message-Id: <20230504-frameless-v1-0-4191201740b0@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAGG/U2QC/x2N0QqDMBAEf0XuuYE0tUX8ldKHS9zUA03LnYgg/ ntjH4edZXYyqMCob3ZSrGLyKRWul4bSyOUNJ0NlCj7c/N23LivPmGDmQuIcH6FDN7RU/cgGF5V LGs/HzLZAz+GryLL9I8/XcfwAdr48onQAAAA= To: gdb-patches@sourceware.org X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: In DAP, an evaluation request without a frame ID should be done at the global scope. This series implements this. Most of the series is minor cleanups to the parser API, to make the final code a bit cleaner. Regression tested on x86-64 Fedora 36. --- Tom Tromey (11): Avoid forward declaration in parse.c Move innermost_block_tracker to expression.h Introduce and use parser flags Simplify parser_state constructor Boolify parser_state::comma_terminates Rearrange parser_state Add PARSER_DEBUG flag Add PARSER_LEAVE_BLOCK_ALONE flag Add flags to parse_and_eval Add global_context parameter to gdb.parse_and_eval Handle DAP evaluate request without a frame ID gdb/NEWS | 4 ++ gdb/ada-exp.y | 2 +- gdb/ax-gdb.c | 3 +- gdb/breakpoint.c | 3 +- gdb/c-exp.y | 2 +- gdb/d-exp.y | 2 +- gdb/doc/python.texi | 7 ++- gdb/eval.c | 7 +-- gdb/expression.h | 78 ++++++++++++++++++++++++++-- gdb/f-exp.y | 2 +- gdb/go-exp.y | 2 +- gdb/parse.c | 97 ++++++++++++++++------------------- gdb/parser-defs.h | 73 ++++++-------------------- gdb/printcmd.c | 5 +- gdb/python/lib/gdb/dap/evaluate.py | 4 +- gdb/python/python.c | 28 +++++++--- gdb/rust-parse.c | 2 +- gdb/testsuite/gdb.dap/frameless.c | 24 +++++++++ gdb/testsuite/gdb.dap/frameless.exp | 62 ++++++++++++++++++++++ gdb/testsuite/gdb.python/py-value.c | 3 ++ gdb/testsuite/gdb.python/py-value.exp | 5 ++ gdb/tracepoint.c | 10 ++-- gdb/value.h | 2 +- 23 files changed, 288 insertions(+), 139 deletions(-) --- base-commit: 3539414584be0094b0a4fe56dfd64ea79d802edc change-id: 20230504-frameless-2cafb628e8d4 Best regards, -- Tom Tromey