From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 8A74A3858D39 for ; Wed, 24 May 2023 16:37:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A74A3858D39 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-xd2c.google.com with SMTP id ca18e2360f4ac-7665e607d1bso30449139f.3 for ; Wed, 24 May 2023 09:37:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1684946244; x=1687538244; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:from:to:cc:subject:date:message-id:reply-to; bh=Jt7IUGOJTNYtwh1A0wSJwcTVEoB3QFAO9yGLOOxlxAc=; b=O3OrNzvuwYDiald1PYUugdxHMPtvDAkCTJWKTNZ1doavOT+/SGx2BJvyh0P8+9AsMI R0OrvfEHrdgeVMqWVqn0hLJWuGt1K9fDi88UFLKJxNTdC4eXeL1w+woXlQaO5soFAuQ+ CBV5hT4TkCHXeu7Z103oRYpArEECiFIo9kje1Va3KfIyZLBriadfHd+/us9YijFE0id5 LZLm4AEswRq9Q0+DrYcLDIMLvqQFecFp1DYEuihS6o7gpT+gfXerWMPxuUnm8Dvv2QlI fsRTjAG6ZoNnWyxH4kf5EvaIz7rLJt56ZroaifWmCgzXGZfjGa5Yg/ZsIE/g7MPI3XnY YBeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684946244; x=1687538244; 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=Jt7IUGOJTNYtwh1A0wSJwcTVEoB3QFAO9yGLOOxlxAc=; b=R9VMqLoSNCCWDHmwtFS/1lYtnjYa2ko4v1l0e/oJu3fWO92Rnz1gh+z9kjzQV6ASfJ vPpwQTQnP97OJIA5ktd1doLjpmri09ZirL+7QXN+Y2FlYAVRo4oy+EsM+HNrMdA/9vk8 OW0XJEaDqkOYRW6zy7uLcnvgHGxk7feit+Ies+vbvbvv7stvwqJbreDXTtpQaSIdJ38i HjI2awvVGHHyXo6/igUTZpQuT3eUBk+o89lOiv+yRvRGQ33/5zjxK8PX4TN1GOqfxOjW fMMV0xi4i+bM4vGfE5Sg2HGo1iSNF1gnUIB0oHesmVZjFxxicqnC78SZ25bLbFvRp6/P MEAQ== X-Gm-Message-State: AC+VfDyqjCnyDo7A6xMn7jfUzga3Dh/sMeUxBErx+HRe4fIyvLNgZDkX 8yT0jRb5e/wrSEciyoPw4u4E/mw0JCnVekWcXoMGbQ== X-Google-Smtp-Source: ACHHUZ4ol00RXbO1MchG4wrDoOqlUoLxzh/taai9oew97xcmbOmyRx8uM7wNMCO4+wv2mIYQEq6p2g== X-Received: by 2002:a5d:9e54:0:b0:774:84b5:cb77 with SMTP id i20-20020a5d9e54000000b0077484b5cb77mr3601506ioi.18.1684946243786; Wed, 24 May 2023 09:37:23 -0700 (PDT) Received: from localhost.localdomain (71-211-130-244.hlrn.qwest.net. [71.211.130.244]) by smtp.gmail.com with ESMTPSA id o22-20020a6bcf16000000b0076c81bf2731sm3397266ioa.20.2023.05.24.09.37.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 09:37:23 -0700 (PDT) From: Tom Tromey Subject: [PATCH 00/25] Many updates to DAP implementation Date: Wed, 24 May 2023 10:36:51 -0600 Message-Id: <20230427-ada-catch-exception-v1-0-947caa9905e3@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACM9bmQC/x2NzQrCQAyEX6XkbKBui3+vIh7SbHRzcC3JIoXSd zf1MvAx8zEruJiKw61bweSrrp8acDx0wIXqS1BzMKQ+Df2YzkiZkKlxQVlY5hZ7vFzzcBojmDK EOZELTkaVy+6+yZvYXswmT13+d/fHtv0AYtp2nn4AAAA= To: gdb-patches@sourceware.org X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-5.0 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: I've been working steadily on the DAP implementation. This series combines a number of patches. It starts with some general refactoring of Ada catchpoints, to make them work more like C++ catchpoints. In particular, now they can be set before the inferior has started. This is then used to implement the DAP setExceptionBreakpoints request. Other patches add DAP features. In some cases a new Python API is added so that it can be used by DAP. I do have some more patches to come after this series goes in. Regression tested on x86-64 Fedora 36. --- Tom Tromey (25): Stop gdb in gnat_runtime_has_debug_info Use gnat_runtime_has_debug_info in Ada catchpoint tests Pass tempflag to ada_catchpoint constructor Transfer ownership of exception string to ada_catchpoint Combine create_excep_cond_exprs and ada_catchpoint::re_set Turn should_stop_exception into a method of ada_catchpoint Mark members of ada_catchpoint "private" Don't require inferior execution for Ada catchpoints Implement DAP setExceptionBreakpoints request Implement DAP attach request Implement DAP stepOut request Add singleThread support to some DAP requests Rename one DAP function Add test for DAP pause request Fix a latent bug in DAP request decorator Use tuples for default arguments in DAP Add type-checking to DAP requests Add gdb.Value.assign method Implement DAP setExpression request Handle DAP supportsVariableType capability Add "target" parameter to DAP attach request Add "stop at main" extension to DAP launch request Implement DAP breakpointLocations request Do not report totalFrames from DAP stackTrace request Implement DAP conditional breakpoints gdb/NEWS | 2 + gdb/ada-lang.c | 210 +++++++++---------------- gdb/ada-lang.h | 2 +- gdb/data-directory/Makefile.in | 2 + gdb/doc/gdb.texinfo | 17 ++ gdb/doc/python.texi | 6 + gdb/mi/mi-cmd-catch.c | 4 +- gdb/python/lib/gdb/dap/__init__.py | 1 + gdb/python/lib/gdb/dap/breakpoint.py | 143 ++++++++++++++--- gdb/python/lib/gdb/dap/bt.py | 14 +- gdb/python/lib/gdb/dap/disassemble.py | 7 +- gdb/python/lib/gdb/dap/evaluate.py | 38 ++++- gdb/python/lib/gdb/dap/launch.py | 42 ++++- gdb/python/lib/gdb/dap/locations.py | 45 ++++++ gdb/python/lib/gdb/dap/memory.py | 4 +- gdb/python/lib/gdb/dap/next.py | 51 ++++-- gdb/python/lib/gdb/dap/scopes.py | 2 +- gdb/python/lib/gdb/dap/server.py | 24 ++- gdb/python/lib/gdb/dap/typecheck.py | 88 +++++++++++ gdb/python/lib/gdb/dap/varref.py | 3 + gdb/python/py-value.c | 30 ++++ gdb/testsuite/gdb.ada/catch_assert_if.exp | 28 +--- gdb/testsuite/gdb.ada/catch_ex.exp | 18 +-- gdb/testsuite/gdb.ada/catch_ex_std.exp | 27 +--- gdb/testsuite/gdb.ada/excep_handle.exp | 24 +-- gdb/testsuite/gdb.ada/mi_catch_assert.exp | 33 +--- gdb/testsuite/gdb.ada/mi_catch_ex.exp | 31 +--- gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp | 32 +--- gdb/testsuite/gdb.ada/mi_ex_cond.exp | 33 +--- gdb/testsuite/gdb.dap/attach.c | 25 +++ gdb/testsuite/gdb.dap/attach.exp | 36 +++++ gdb/testsuite/gdb.dap/basic-dap.c | 12 +- gdb/testsuite/gdb.dap/basic-dap.exp | 35 ++++- gdb/testsuite/gdb.dap/catch-exception.exp | 66 ++++++++ gdb/testsuite/gdb.dap/catch-exception/pck.ads | 18 +++ gdb/testsuite/gdb.dap/catch-exception/prog.adb | 44 ++++++ gdb/testsuite/gdb.dap/cond-bp.c | 26 +++ gdb/testsuite/gdb.dap/cond-bp.exp | 65 ++++++++ gdb/testsuite/gdb.dap/pause.exp | 41 +++++ gdb/testsuite/gdb.dap/remote-dap.exp | 49 ++++++ gdb/testsuite/gdb.dap/stop-at-main.exp | 37 +++++ gdb/testsuite/gdb.dap/type_check.exp | 29 ++++ gdb/testsuite/gdb.dap/type_check.py | 96 +++++++++++ gdb/testsuite/gdb.python/py-value.exp | 14 ++ gdb/testsuite/lib/ada.exp | 2 + gdb/testsuite/lib/dap-support.exp | 43 ++++- 46 files changed, 1199 insertions(+), 400 deletions(-) --- base-commit: 389971df23ca74092314dbde1303310a33766ba7 change-id: 20230427-ada-catch-exception-89d3649d3cad Best regards, -- Tom Tromey