Message ID | 20240516-dap-global-scope-v1-0-07c493009505@adacore.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C18F43849AFC for <patchwork@sourceware.org>; Thu, 16 May 2024 18:01:46 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by sourceware.org (Postfix) with ESMTPS id 8CEF33858D20 for <gdb-patches@sourceware.org>; Thu, 16 May 2024 18:01:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8CEF33858D20 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8CEF33858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715882475; cv=none; b=EB7yLhsLbO3eM+cP7x5uNHTTcWplYDzfKYwBgg2WqOR7iAWm6tlOwAFu9G6XOovU3l8PhtrJ4zraMPPhfE8FqALWRx8tP4CfrQnogJXp80IjYTcrnUXf/lG/PL19Qs459K1gMoAIkwm1YGwZ7CXBoAavu4qDWrVXVm9jI0qdZxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715882475; c=relaxed/simple; bh=8N4C+UfBoNijMLKuX+6yel+laBmrPSkqruMMA9Gidao=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=El3XTSK3H6ags1MFsazvJqlZBHXdjKnJ5JF4JJVsV2E6G/pmr8qpzS2rjRlT+aVzQrVtYHYjlZgotZHwYqDFkVEsNs7/E/O5JT5Jzx/Vf1DSoHucVkKXNM+ONLlPQvJMHjloOvybJBC8tJ/Nyz5bVzJBnMk6ME3alDeJZhFcJSk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7e1ec659c40so67101239f.2 for <gdb-patches@sourceware.org>; Thu, 16 May 2024 11:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1715882473; x=1716487273; darn=sourceware.org; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:from:to:cc:subject:date:message-id:reply-to; bh=156nMUGTgBNv/ahMJYs2vZjkQ7vefCtouzBMQtiqHGo=; b=RIadECYTzTddC1ohaCZG3obVA2nacWjn6R9axM8smJGG8aR+d8C3G2vafMxDdihn37 9Z+ioduYk+YISBLjZhV6QxQtY+fr9msNVPkeQcY0qpzYDyDOtFqAkuF+o4WE6V3KRmUA wvKguCzeYeYp3Pk/y/a/9UpN0pnve6koe2Up2m0TwknbmWya5JrnqD1tN0PIkASfnoN9 QULgDhEwC9j/74WozHRgLPyAScG3F3nyGR9dqimzYTjKYWOd4GKv047iQ/G5pThENRhH XIU3uBKEd3+I7WXwcrVAU8wWZcuI2QiaHzneIivU7hcXegFHBeBR/4HY9+G2313ybeET LL8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715882473; x=1716487273; 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=156nMUGTgBNv/ahMJYs2vZjkQ7vefCtouzBMQtiqHGo=; b=ETvFImdLivGKTxfmzVd2QlLDU+3jS4JroZvuE5FtaH62XeY6hHmYShu5xoukhRHlWw avV6B3AbAWEpq6N95TVrZHTokvJox+uLp493oo8Z6TkiLkqg2Tscq9bxKzn+5hDFpRzN RVX1YbVH5cGDeXoTgKZZlPWb7BJO6eMw9V022DtUAS3urCv6VxxpsyuApYkaGjXe/c7D ZMA9im/KX7X7ng4o5WGE+4sVu5NPkTDDLeSygFDq3TIFdWXmJ+h3SacktrAplnvYHRC8 Qb3CrrGlKj/l2g3K2VBrdXWMKvXR9bQKdox50x1LOWasCFP0P2W/K08vvFVV6SUuHL1u wjSg== X-Gm-Message-State: AOJu0Yygi+fr6gYPuoF1TDK5Lmeqnlqo06L1dWSROzTnlEbn6Gmt1yZZ vpPgH7RXrYXVgVg+Jj6uLQOKNgk21dOMVp131pRY0ztgYzC6jayu415LnhQaLkXbfv8CEQawTm0 = X-Google-Smtp-Source: AGHT+IE61eLWaQKLyq0W74p7m/kTGl8YkAT8sZ3HwEMuIh7cWeGv0i38AFVBOoNSM6FCdKQpIPcdCw== X-Received: by 2002:a6b:5b0e:0:b0:7da:4135:89be with SMTP id ca18e2360f4ac-7e1b521f9b3mr2252842739f.17.1715882472312; Thu, 16 May 2024 11:01:12 -0700 (PDT) Received: from localhost.localdomain (75-166-134-4.hlrn.qwest.net. [75.166.134.4]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-489376dc936sm4287426173.142.2024.05.16.11.01.11 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:01:11 -0700 (PDT) From: Tom Tromey <tromey@adacore.com> Subject: [PATCH 0/3] Return a global scope from DAP scopes request Date: Thu, 16 May 2024 12:01:10 -0600 Message-Id: <20240516-dap-global-scope-v1-0-07c493009505@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAOZJRmYC/x3MTQ6CMBBA4auQWTuxoODPVQyLaRnLJNg2M8aQE O5udfkt3tvAWIUN7s0Gyh8xyamiPTQQZkqRUaZq6Fx3dn074EQF45I9LWghF8bhdmHfn8hdHUH NivJT1v/yMVZ7MkavlML8G2WVKOn4Inuzwr5/AW0exlOCAAAA To: gdb-patches@sourceware.org X-Mailer: b4 0.13.0 X-Spam-Status: No, score=-5.1 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series |
Return a global scope from DAP scopes request
|
|
Message
Tom Tromey
May 16, 2024, 6:01 p.m. UTC
A co-worker asked that some global variables (in his case, specifically package-scoped variables in Ada) be visible in the response to the DAP "scopes" request. This series implements this. I wasn't completely sure what to call the resulting scope. I chose "globals" but really the scope here is "globals local to the frame's CU". --- Tom Tromey (3): Memoize gdb.Block and make them hashable Convert DAP disassemble code to use Block hashing Return global scope from DAP scopes request gdb/NEWS | 3 + gdb/data-directory/Makefile.in | 1 + gdb/python/lib/gdb/dap/disassemble.py | 7 +- gdb/python/lib/gdb/dap/globalvars.py | 97 +++++++++++++++++++++++ gdb/python/lib/gdb/dap/scopes.py | 4 + gdb/python/py-block.c | 143 +++++++++++++++++++--------------- gdb/testsuite/gdb.dap/ptrref.exp | 8 +- gdb/testsuite/gdb.dap/rust-slices.exp | 4 +- gdb/testsuite/gdb.python/py-block.exp | 4 + 9 files changed, 199 insertions(+), 72 deletions(-) --- base-commit: 89457440e4a4b71b1fe60ed3e034c814bf8eb6b7 change-id: 20240516-dap-global-scope-697eb53a080a Best regards,
Comments
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
Tom> A co-worker asked that some global variables (in his case,
Tom> specifically package-scoped variables in Ada) be visible in the
Tom> response to the DAP "scopes" request.
Tom> This series implements this. I wasn't completely sure what to call
Tom> the resulting scope. I chose "globals" but really the scope here is
Tom> "globals local to the frame's CU".
I minorly updated the NEWS change to reflect the gdb 15 release (moved
the text up to the new section).
I'm checking this in now.
Tom