From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1989 invoked by alias); 21 Sep 2009 22:15:08 -0000 Received: (qmail 1974 invoked by uid 48); 21 Sep 2009 22:15:08 -0000 Date: Mon, 21 Sep 2009 22:15:00 -0000 From: "jason dot orendorff at gmail dot com" To: gdb-prs@sourceware.org Message-ID: <20090921221506.10682.jason.orendorff@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug python/10682] New: gdb.backtrace doesn't handle reloading well X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00296.txt.bz2 First, if push_frame_filter is called more than once, create_frame_filter dies. The lambda created in push_frame_filter calls itself recursively. Second, and more seriously, the gdb.backtrace.push_frame_filter API is not really suitable to be called by a Python extension at import time. It's effectful and non-idempotent. I hit both problems the first time I tried reload()ing a module that registers a frame filter. :-| It will be hard to fix without changing the API. The (untested) attachment attempts one gruesome hack, but I hope you can take a breaking API change instead. -- Summary: gdb.backtrace doesn't handle reloading well Product: gdb Version: archer Status: UNCONFIRMED Severity: normal Priority: P2 Component: python AssignedTo: unassigned at sourceware dot org ReportedBy: jason dot orendorff at gmail dot com CC: gdb-prs at sourceware dot org http://sourceware.org/bugzilla/show_bug.cgi?id=10682 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.