Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: <Paul_Koning@Dell.com>
To: <pmuldoon@redhat.com>
Cc: <omeragacan@gmail.com>, <gdb@sourceware.org>
Subject: Re: recursion limit exceeded in Python API, but there's only one function in traceback
Date: Thu, 16 Oct 2014 14:28:00 -0000	[thread overview]
Message-ID: <104DEFBD-D686-4290-8E3C-725A51C165E6@dell.com> (raw)
In-Reply-To: <543FBDFF.3050709@redhat.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1266 bytes --]


On Oct 16, 2014, at 8:45 AM, Phil Muldoon <pmuldoon@redhat.com> wrote:

> On 16/10/14 11:45, Ömer Sinan Ağacan wrote:
>> Hi all,
>> 
>> I'm putting some breakpoints and then running some actions when
>> program reaches that points, using Python API.
>> 
>> After a few breaks, GDB is starting to print these lines:
>> 
>> Traceback (most recent call last):
>>  File "/home/omer/gdb_script/script.py", line 71, in handle_breakpoint
>>    self.breakpoint_jump_addrs[bp.location].add(addr)
>> RuntimeError: maximum recursion depth exceeded
> 
> That's an error from Python.  It tells me something in script.py is
> not quite right.  Impossible to tell without seeing script.py in
> general.  You can increase the recursion depth by doing something like
> 
> import sys
> sys.setrecursionlimit(9000)
> 
> Where '9000' is a limit you can set and vary.  However, this might
> indeed be papering over the cracks, and not fixing the fault.

I would expect that you could wrap the script in a try/except block, to catch the stack overflow and print a Python stack trace when that happens.

Should GDB print a Python backtrace when the Python script fails, just as executing a Python script standalone would do?

	paul

\x16º&ÖëzÛ«ŸûóÉb²Ö«r\x18\x1d

  reply	other threads:[~2014-10-16 14:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 10:46 Ömer Sinan Ağacan
2014-10-16 12:45 ` Phil Muldoon
2014-10-16 14:28   ` Paul_Koning [this message]
     [not found]     ` <CAMQQO3=GxjGzF-9RXQsJ_9=Du3rS-UoYFA_0-friPp1nMa8yAA@mail.gmail.com>
2014-10-16 15:04       ` Paul_Koning
2014-10-16 15:15         ` Ömer Sinan Ağacan
2014-10-16 15:18         ` Ömer Sinan Ağacan
2014-10-17  9:31           ` Ömer Sinan Ağacan
2014-10-17 10:11             ` Phil Muldoon
2014-10-17 10:53               ` Ömer Sinan Ağacan
2014-10-17 14:20                 ` Phil Muldoon
2014-10-17 14:27                   ` Ömer Sinan Ağacan
2014-10-17 15:02                     ` Phil Muldoon
2014-10-17 15:04               ` Paul_Koning
2014-10-17 17:31                 ` Phil Muldoon
2014-10-17 16:41             ` Doug Evans
2014-10-17 17:35               ` Phil Muldoon
2014-10-17 16:45           ` Doug Evans
     [not found]     ` <543FE072.6040507@redhat.com>
2014-10-16 15:16       ` Ömer Sinan Ağacan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=104DEFBD-D686-4290-8E3C-725A51C165E6@dell.com \
    --to=paul_koning@dell.com \
    --cc=gdb@sourceware.org \
    --cc=omeragacan@gmail.com \
    --cc=pmuldoon@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox