From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by sourceware.org (Postfix) with ESMTPS id D6CDA3858D28 for ; Tue, 5 Sep 2023 19:47:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D6CDA3858D28 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-xd36.google.com with SMTP id ca18e2360f4ac-79565370a93so96412339f.0 for ; Tue, 05 Sep 2023 12:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1693943223; x=1694548023; 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=ipPXJq1PDLjjljSiehdB1nkCeTKGYM0DOqFmF4Ahcno=; b=U+xQNPgzuMjUhiKafFcx/YVFl+PgaNEPOcFVlelxSTkej+N3g2GcctVIFtrTV32LlY 5k7+pxQjWhEOiKcqVCqBmjAZEOq6w2DsVg/WHEEoyhBMFMQpTC7FYjzLWDFNPq3X3t0g 0SQmzr20PKOzrDzx8TN9PTCnweZMQoF+9sWtFgFtCPrsxtIyW7DcKC1tOq7CLNouB2Oa rgSQmGQ2vnu40yo+kT2uOl66l1pu2OXG98NFYrDPZB/L7yQtXp75srhO+WT56OZjEqNb JI9xO69UabldfX2yBBLCL28ymtVxuv0erPN145vu2frdkWenDyaoH1RS3tAL238gDiFB eeIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693943223; x=1694548023; 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=ipPXJq1PDLjjljSiehdB1nkCeTKGYM0DOqFmF4Ahcno=; b=aYOR//S663ZOKE/Kmu8YjWu3rTcPToKNj/6cHfdeo5N702Ywq+vwFEMp/y6Uuq/p/P 7N+I1Mmgj/1S9nQpsJBC9DSRU7ZAZ2sdexA8iDlzvLf8zlDR4vo/oz73EDZg/UrA+MUS xX6EF7/UtTHoawjkgptN28WaS9eCS7/I5Ej/UcfZj5vOh0bJz6KDlDhwd6F/dm8Duxul DcRILYDXsta8DM2GDj5xPm7eEkTMh6xfM74AfQnrQpNXqTmTMU1IfTaayFmi6u/iCGIQ +gG1QEbjExnPlmywZ9BDoLkMru7zVsIU3zqR8DAUZ7cLjMjNoTPMFWlpSmmaMLgKJ8io 85VA== X-Gm-Message-State: AOJu0YytgeQTCBQEdZ1xsRLnEXDEnpXegXhimEmfzgoyh8g7k8SDtdPl i/nJpOYrrLWOgHB7j/Sa8JV0R5FKXademuD2sYy5oA== X-Google-Smtp-Source: AGHT+IHMy6oy/uRAs1puoCw4fAJa/4eSyvxgANeGCZ1oJVgoe5UeVPzbXEIALTjh0XJfvT0KK1XChg== X-Received: by 2002:a05:6602:3b88:b0:786:25a3:ef30 with SMTP id dm8-20020a0566023b8800b0078625a3ef30mr15998636iob.7.1693943223080; Tue, 05 Sep 2023 12:47:03 -0700 (PDT) Received: from localhost.localdomain (75-166-150-212.hlrn.qwest.net. [75.166.150.212]) by smtp.gmail.com with ESMTPSA id y9-20020a02a389000000b0042b144abf71sm4294910jak.179.2023.09.05.12.47.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 12:47:02 -0700 (PDT) From: Tom Tromey Subject: [PATCH 0/5] Handle pointers and references correctly in DAP Date: Tue, 05 Sep 2023 13:47:00 -0600 Message-Id: <20230905-dap-30821-pointers-v1-0-0d7323327678@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIALSF92QC/x3MQQqDQAxA0atI1g2MI4p6ldJFZow1C8chKaUg3 r1pl2/x/wnGKmwwNycov8XkKI721kDeqDwZZXFDDLELU+hxoYpdGGOL9ZDyYjUc0hBzn9NI0wo eVuVVPv/p/eFOZIxJqeTtt9rJPIPr+gLH4zejfQAAAA== To: gdb-patches@sourceware.org X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-5.6 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 List-Id: This series started off as a simple implementation of a no-op pretty-printer to handle pointers and references in DAP. However, this regressed a test, and I realized that the new is-array-like and is-string-like code should be generalized to work with any language. This is done by associating a language with each type, which meant touching every debug reader, plus a few minor preliminary cleanups. Regression tested on x86-64 Fedora 36. --- Tom Tromey (5): Pass a type allocator to init_fixed_point_type Regularize some DWARF type initialization Add is_array_like and to_array to language_defn Give a language to a type Handle pointers and references correctly in DAP gdb/ada-lang.c | 13 +++++ gdb/coffread.c | 4 +- gdb/ctfread.c | 17 ++++--- gdb/dwarf2/read.c | 89 +++++++++++++++++---------------- gdb/gdbtypes.c | 31 ++++++------ gdb/gdbtypes.h | 37 ++++++++------ gdb/language.h | 11 +++++ gdb/mdebugread.c | 9 ++-- gdb/python/lib/gdb/printing.py | 16 ++++++ gdb/python/py-type.c | 13 ++--- gdb/rust-lang.h | 10 ++++ gdb/stabsread.c | 20 ++++---- gdb/testsuite/gdb.dap/ptrref.cc | 34 +++++++++++++ gdb/testsuite/gdb.dap/ptrref.exp | 103 +++++++++++++++++++++++++++++++++++++++ gdb/valarith.c | 6 +-- 15 files changed, 303 insertions(+), 110 deletions(-) --- base-commit: a006bc9c37e95b4afaf85715cc54fe57b3300ccd change-id: 20230905-dap-30821-pointers-6b62c5cb8a9f Best regards, -- Tom Tromey