From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 0D36F385780D for ; Tue, 2 Feb 2021 16:46:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0D36F385780D Received: from fencepost.gnu.org ([2001:470:142:3::e]:49790) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6yoi-0007zv-9k for gdb@sourceware.org; Tue, 02 Feb 2021 11:46:16 -0500 Received: from pool-96-233-64-159.bstnma.fios.verizon.net ([96.233.64.159]:47722 helo=pdslaptop.home) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6yoh-0006LD-Lk for gdb@sourceware.org; Tue, 02 Feb 2021 11:46:16 -0500 Message-ID: <5cd0968ec197296af56a32a368a4dd01a299b1e1.camel@gnu.org> Subject: Python interface: is there any way to... From: Paul Smith Reply-To: psmith@gnu.org To: gdb@sourceware.org Date: Tue, 02 Feb 2021 11:46:14 -0500 Organization: GNU's Not UNIX! Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , X-List-Received-Date: Tue, 02 Feb 2021 16:46:18 -0000 I'm wondering if there are ways to detect, from within the Python extensions for GDB, these things: Can I determine whether I'm working on a core file, versus working with a live process? Can I determine whether my Python methods are being invoked from within a variable "pretty printer context", versus some other context such as the result of a function call from the prompt etc.? Thanks!