From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28559 invoked by alias); 16 Oct 2014 15:15:37 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 28543 invoked by uid 89); 16 Oct 2014 15:15:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 16 Oct 2014 15:15:35 +0000 Received: by mail-wi0-f177.google.com with SMTP id fb4so5057228wid.4 for ; Thu, 16 Oct 2014 08:15:33 -0700 (PDT) X-Received: by 10.180.12.50 with SMTP id v18mr6928657wib.60.1413472532841; Thu, 16 Oct 2014 08:15:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.106.68 with HTTP; Thu, 16 Oct 2014 08:14:50 -0700 (PDT) In-Reply-To: <7BB30632-15BE-4EF8-B84F-D35A27772F18@dell.com> References: <543FBDFF.3050709@redhat.com> <104DEFBD-D686-4290-8E3C-725A51C165E6@dell.com> <7BB30632-15BE-4EF8-B84F-D35A27772F18@dell.com> From: =?UTF-8?Q?=C3=96mer_Sinan_A=C4=9Facan?= Date: Thu, 16 Oct 2014 15:15:00 -0000 Message-ID: Subject: Re: recursion limit exceeded in Python API, but there's only one function in traceback To: paul_koning Cc: pmuldoon , gdb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00046.txt.bz2 2014-10-16 18:03 GMT+03:00 : > Is that the handler for a breakpoint? Does the completion of the =E2=80= =9Csi=E2=80=9D command invoke the breakpoint handler? If yes, that=E2=80= =99s your answer. > > paul Interesting, but I don't think that's causing the problem. I changed the script to: import gdb import traceback def handler(ev): try: print "handling a stop" gdb.execute("stepi") gdb.execute("continue") except: traceback.print_stack() gdb.events.stop.connect(handler) When I first attach to the process, I'm getting: [..snip..] handling a stop 0x080eecea in UpdateInput() () handling a stop 0x080eecef in UpdateInput() () handling a stop 0x080eece0 in UpdateInput() () handling a stop 0x080eece7 in UpdateInput() () Traceback (most recent call last): File "/home/omer/gdb_script/stackoverflow.py", line 10, in handler traceback.print_stack() File "/usr/lib64/python2.7/traceback.py", line 269, in print_stack print_list(extract_stack(f, limit), file) File "/usr/lib64/python2.7/traceback.py", line 304, in extract_stack linecache.checkcache(filename) RuntimeError: maximum recursion depth exceeded Again a weird "recursion error" with just 3 stack frames. When I ignore and continue with `c`, it's failing with this: [.. snip ..] File "/home/omer/gdb_script/stackoverflow.py", line 7, in handler gdb.execute("stepi") File "/home/omer/gdb_script/stackoverflow.py", line 7, in handler gdb.execute("stepi") File "/home/omer/gdb_script/stackoverflow.py", line 10, in handler traceback.print_stack() File "/home/omer/gdb_script/stackoverflow.py", line 7, in handler gdb.execute("stepi") [.. snip ..] There are thousands of same lines like this.