From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id 4956A3858D32 for ; Tue, 5 Sep 2023 17:22:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4956A3858D32 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-xd2b.google.com with SMTP id ca18e2360f4ac-794c7d95ba5so106195139f.0 for ; Tue, 05 Sep 2023 10:22:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1693934535; x=1694539335; darn=sourceware.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=q51iwJP3KqT2v1vKZozcVcab/gTbEGLiu1XTeh/t0/E=; b=OVozWw63tkVzpUzZpAbNapUsCID7FbVPR7/Vp9Vs7oBZVfL1UUTvb77ZbNPp++g/Ew WJEB1rqE0RLgHpJeuYmCPGc4En0DKXqLP5DFcWHFWuSQJKcTOegIbyHwjr+dIylh6i1F nkqi4mufCt7eePBoso9wLGEHhXhc/4dF49jm4UuAOQrzwcARVkQCFG38DprauunWUfcZ MUk626v06g59pZ18lSQns6scPb+yYvezw90wqI7ii46L6VRp2n0J733pOlPGUqYnRlpc hbqdbdwH7sqIk/uLUx1KFNg4uu3dM4jPWyRDVKFmTx+xgP1TIKS9DNxc0jRTeEdHjnwp 7CwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693934535; x=1694539335; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=q51iwJP3KqT2v1vKZozcVcab/gTbEGLiu1XTeh/t0/E=; b=QCjBJ1k7UT4KBk2pZs3W2W/ttNVGZRE+9wohm+hDUB0ZZCABXxkCB7t8ixKnLu+kZ7 0UzVAsLcrC4S6MiIgJ+yFmZrBcP4Jg5+geJU4e8w2Qw6BXQX+1MxqCI/v+5NmBfdNHRM i/ZbCVDKBnZeV/H58MH7jVJNYFK4Knash4d/QExLHfDb4n4OvS6OcEQLZZr7Mt8Hh+Md pIsj2oFyfJGWoS340WCzKThWJ7gv4XlZz1JwbLTW14j8PYz/dEfsf3O2Uieme/Ag6fkF ZB9GWc33tiGY0vbvnK8JPYISf0AHYDG52d1ZZXzl//quqjHzYQh7qg3csyqC7IR46du0 VMXQ== X-Gm-Message-State: AOJu0YwulL3nL3118uxakk62AInxFeEyaV8FsujpxEeWaTowmpY27URc gZ3jmHQpXTcpBmmevBSkpm5c7g== X-Google-Smtp-Source: AGHT+IHsGZApsFAlCp5/A5WT8LBl6H+RmEIy7tqBeeolUCbTSiHGIWKCQRwLaN11pQa2NNR6VHbNhg== X-Received: by 2002:a92:d4c6:0:b0:34c:cb72:32f7 with SMTP id o6-20020a92d4c6000000b0034ccb7232f7mr13792978ilm.24.1693934535560; Tue, 05 Sep 2023 10:22:15 -0700 (PDT) Received: from murgatroyd (75-166-150-212.hlrn.qwest.net. [75.166.150.212]) by smtp.gmail.com with ESMTPSA id t9-20020a056e02060900b0032b72b5c1c3sm4313167ils.9.2023.09.05.10.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 10:22:15 -0700 (PDT) From: Tom Tromey To: Tom Tromey via Gdb-patches Cc: Tom Tromey Subject: Re: [PATCH 0/8] Handle array- and string-like types in DAP References: <20230822-array-and-string-like-v1-0-2dcea29b0567@adacore.com> X-Attribution: Tom Date: Tue, 05 Sep 2023 11:22:14 -0600 In-Reply-To: <20230822-array-and-string-like-v1-0-2dcea29b0567@adacore.com> (Tom Tromey via Gdb-patches's message of "Tue, 22 Aug 2023 09:25:06 -0600") Message-ID: <87pm2wmt6h.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.5 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: >>>>> "Tom" == Tom Tromey via Gdb-patches writes: Tom> A co-worker noticed that some Ada array types did not display properly Tom> via DAP. Looking into this, I found a couple related problems. Tom> In Ada, some arrays are represented as structures. The Ada code in Tom> gdb (ada-valprint.c and ada-varobj.c) know how to display these as Tom> arrays, instead. Tom> Also, in Ada, a String is just an array of characters, and again the Tom> Ada code in gdb understands this and displays them more naturally. Tom> Similar cases occur in Rust. Tom> After thinking about this for a while, I decided to try to take a Tom> relatively generic approach to fixing this. This series adds some Tom> Python API so that Python code can know if a type is "array-like" or Tom> "string-like", and then changes the no-op value-printers to use this Tom> information. Tom> All the tests are deferred until the end of the series. I'm checking these in now. Tom