From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BssPFraB7WMdkTQAWB0awg (envelope-from ) for ; Wed, 15 Feb 2023 20:07:02 -0500 Received: by simark.ca (Postfix, from userid 112) id 46EE01E221; Wed, 15 Feb 2023 20:07:02 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=PnDGHdrl; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 E620D1E112 for ; Wed, 15 Feb 2023 20:07:01 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A6F6F385841D for ; Thu, 16 Feb 2023 01:06:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6F6F385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676509618; bh=bg5CeDfA1xxLmvf6VBgy5oroLqYB4uTMXQuSEK1DYYM=; h=Subject:In-Reply-To:Date:Cc:References:To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=PnDGHdrlht7nY9+M9xrVjaFTiqd5SdpDVk/DP43jko9TVRhQoMLp3XTd6ylHcc03D t78OIFfa41H0/MtOjx2ij0zuA7Xtml+Z9Ziym9t08/x9qcXq8qne8FS+l6r3hXeeCN 2lLaEzONeQ2APQ9MVqrN2gyd6u/5VBsw4hEWk+iI= Received: from resdmta-a1p-077302.sys.comcast.net (resdmta-a1p-077302.sys.comcast.net [IPv6:2001:558:fd01:2bb4::c]) by sourceware.org (Postfix) with ESMTPS id E79613858D33 for ; Thu, 16 Feb 2023 01:06:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E79613858D33 Received: from resomta-a1p-076783.sys.comcast.net ([96.103.145.231]) by resdmta-a1p-077302.sys.comcast.net with ESMTP id SH50pawYYGoOySSj7paVND; Thu, 16 Feb 2023 01:06:21 +0000 Received: from smtpclient.apple ([73.60.223.101]) by resomta-a1p-076783.sys.comcast.net with ESMTPSA id SSiepxWVXbP5kSSikpaUfe; Thu, 16 Feb 2023 01:05:59 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvhedrudeiiedgfedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucenucfjughrpegtggfuhfgjffevgffkfhfvofesthhqmhdthhdtvdenucfhrhhomheprfgruhhlucfmohhnihhnghcuoehprghulhhkohhnihhnghestghomhgtrghsthdrnhgvtheqnecuggftrfgrthhtvghrnheptdfhudegffekieeugeduudfhudfhhfelleejteeuiefgjeeitddtuddtveehgfeknecuffhomhgrihhnpehsohhurhgtvgifrghrvgdrohhrghenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehsmhhtphgtlhhivghnthdrrghpphhlvgdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjhgrnhesvhhrrghnhidrihhopdhrtghpthhtohepghgusgesshhouhhrtggvfigrrhgvrdhorhhg X-Xfinity-VMeta: sc=0.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: Executing a CLI command from Python In-Reply-To: <744609d04637cc9f9057ba21b94b6bde0d931453.camel@vrany.io> Date: Wed, 15 Feb 2023 19:29:33 -0500 Cc: gdb@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <744609d04637cc9f9057ba21b94b6bde0d931453.camel@vrany.io> To: Jan Vrany X-Mailer: Apple Mail (2.3696.120.41.1.2) 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: , From: Paul Koning via Gdb Reply-To: Paul Koning Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" > On Feb 15, 2023, at 5:25 PM, Jan Vrany via Gdb = wrote: >=20 > On Wed, 2023-02-15 at 16:50 -0500, Paul Koning via Gdb wrote: >> I looked through the Python GDB API documentation but didn't see = this: is there a way for Python code to ask GDB to execute a command? >>=20 >> For example, I want to look up information about a kernel module = (addresses etc.) then issue an "add-symbol-file" command using = parameters constructed from what was looked up. >>=20 > I think this can be done with gdb.execute (): >=20 > = https://sourceware.org/gdb/current/onlinedocs/gdb.html/Basic-Python.html#B= asic-Python Sure looks like it. Thanks Jan. I didn't think to look in "basic" for = that feature. paul