From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 2634A3858D3C for ; Fri, 2 Jun 2023 19:19:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2634A3858D3C 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-il1-x136.google.com with SMTP id e9e14a558f8ab-33b4552e55cso8808665ab.0 for ; Fri, 02 Jun 2023 12:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1685733543; x=1688325543; 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=paroIJPefnorcQD8vweM79B03q7uoxgC2ArreUNboe0=; b=R5d5369LT3js707Nb406eVZQYuD0DXvRBad/EcGnmtnlxIFYr7IJQd/46nmMB2sIol ICM8JydiBdxhVZrz4G6Q/RF0byb4+7QipX8N9JK+OAUvw1DZJmjznIhzp7n0MfslqPBF VjLTmnbr7poIB9qjlAnsMsyC03ii2RroqlSLA13IV2Jd9NZk6gXMyN+w4V0BzI8PerOS 2/ZCWi3Hh8WBfTy7ls8ZwIW/3Gy8LKl4CepYWd06iAZ7PN4U8f0Q1cdaloVVVqZdI0Ze /qFG3db2XBMGYLevxtBLnFT35/vz1H7oN9f1AXxJbJPbtHxGJhdmMEu/azLPh6zWsSXy wFVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685733543; x=1688325543; 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=paroIJPefnorcQD8vweM79B03q7uoxgC2ArreUNboe0=; b=hQfpVN53jW0UbXX++8OYOasNbAjMsA2s7Oyqropbatm7z8SMgqEVrUwhOkgfjXw2CT 4PQMH+1BGy3PD0DPZbkwUZ7wkWf4/iY1bfLgVS3aqKRY1kzvjHjgE6B/QsYC6qN4PIxx EJENFkpJpIjXc+cbg9NVETfk2rzkBTtGV1NS+QM9cvQXI6NYP93fJlEesaBk/cZfVKbJ 4kttn5AxAnavASarMunoXnhN59KQfDPpnhZNVqKUjlKxpX3kIOtEl2vkTFNBZzKCAErI 9uKI3SSQFmpsOUiExwWtYP38p7+Rz7CXmvLn/S3eQs3mNoQoPjA43mUBJSR9NefJiI3T /4bQ== X-Gm-Message-State: AC+VfDwiy7rh/yxz+hTgzlaojjGI6mqJhWxyEf+BcHLFOSJO90YZ8mKs f4oG0x8VbLKABMnzNt0D52vm1tQbDMNWQyMRnCZT9Q== X-Google-Smtp-Source: ACHHUZ71roBft+eq0busGZLk+mpt3xMCOJbZBrR8UZQSvcgm35Kv9TeinJ1WDGmCgvVYMSBawNx/XQ== X-Received: by 2002:a92:c24e:0:b0:314:17d4:e9f6 with SMTP id k14-20020a92c24e000000b0031417d4e9f6mr6188919ilo.6.1685733543351; Fri, 02 Jun 2023 12:19:03 -0700 (PDT) Received: from murgatroyd (71-211-130-244.hlrn.qwest.net. [71.211.130.244]) by smtp.gmail.com with ESMTPSA id s15-20020a02cc8f000000b0041627abe120sm451460jap.160.2023.06.02.12.19.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 12:19:02 -0700 (PDT) From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 8/9] Implement gdb.execute_mi References: <20230404-dap-loaded-sources-v2-0-93f229095e03@adacore.com> <20230404-dap-loaded-sources-v2-8-93f229095e03@adacore.com> <3f4fa15a-29f0-f1bb-f824-fbe9d344c397@simark.ca> X-Attribution: Tom Date: Fri, 02 Jun 2023 13:19:02 -0600 In-Reply-To: <3f4fa15a-29f0-f1bb-f824-fbe9d344c397@simark.ca> (Simon Marchi's message of "Mon, 29 May 2023 11:54:17 -0400") Message-ID: <87bkhxu0yh.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.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,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: Simon> My patch here: Simon> https://inbox.sourceware.org/gdb-patches/48eb5ee9-53e1-f1df-b424-d08342c7e857@simark.ca/T/#m94825956483bc1d340da33ad4712752d3326fecf Simon> conflicts with this patch, so I am taking a closer look at Simon> gdb.execute_mi. I think some things are missing from the gdb.execute_mi Simon> implementation [...] I just wanted to let you know I haven't dropped this. I didn't look at it much but I hope to investigate a bit next week. Simon> (gdb) python gdb.execute_mi('-gdb-exit') Simon> First, I think that the new mi_execute_command function should install Simon> the mi interpreter as the current interpreter (or the command Simon> interpreter, I don't really understand the distinction) such as code Simon> down mi_execute_command gets the mi_interp object when calling Simon> current_interpreter. There are not a lot of commands getting the Simon> current interpreter, but -gdb-exit is one of them. I tried fixing this Simon> quickly, but it's not just a oneliner. I wouldn't mind disallowing -gdb-exit from execute_mi. That's a pathological case anyway. I looked for calls to current_interpreter in the MI code but I don't see many... though who knows what the core of gdb is doing. In fact the -gdb-exit one is the only one that seems to be part of a command. Tom