From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mvC1CYkuo2R65xQAWB0awg (envelope-from ) for ; Mon, 03 Jul 2023 16:24:41 -0400 Received: by simark.ca (Postfix, from userid 112) id 19E221E0BD; Mon, 3 Jul 2023 16:24:41 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0A0211E0AC for ; Mon, 3 Jul 2023 16:24:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9D3A73857344 for ; Mon, 3 Jul 2023 20:24:38 +0000 (GMT) Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 0D2133858D32 for ; Mon, 3 Jul 2023 20:24:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D2133858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: by gnu.wildebeest.org (Postfix, from userid 1000) id C812E3000D0D; Mon, 3 Jul 2023 22:24:21 +0200 (CEST) Date: Mon, 3 Jul 2023 22:24:21 +0200 From: Mark Wielaard To: Tom Tromey Cc: Florian Weimer via Gdb , Florian Weimer Subject: Re: Using GDB as a Python interpreter Message-ID: <20230703202421.GA11693@gnu.wildebeest.org> References: <87sfa8vwqx.fsf@oldenburg.str.redhat.com> <87zg4cvl6x.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zg4cvl6x.fsf@tromey.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-3029.5 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Mon, Jul 03, 2023 at 01:39:34PM -0600, Tom Tromey wrote: > >>>>> "Florian" == Florian Weimer via Gdb writes: > > Florian> I want to run a Python script with GDB, from the shell command line, > Florian> without having to create two files. > > Once upon a time, Red Hat had a patch to add a '-P' option to gdb, which > would put it directly into Python scripting. I think maybe I wrote it > ages ago, but then when Andrew tried to submit it upstream, I basically > rejected it. > > That was a mistake on my part. IIRC he had a pretty good > counter-argument at the time, I don't recall why I didn't recant. Was that this? https://inbox.sourceware.org/gdb-patches/20190721235427.21893-1-kevinb@redhat.com/ Cheers, Mark