Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Ömer Sinan Ağacan" <omeragacan@gmail.com>
To: paul_koning <Paul_Koning@dell.com>
Cc: pmuldoon <pmuldoon@redhat.com>, gdb <gdb@sourceware.org>
Subject: Re: recursion limit exceeded in Python API, but there's only one function in traceback
Date: Thu, 16 Oct 2014 15:15:00 -0000	[thread overview]
Message-ID: <CAMQQO3mfg3Q9ij14XJ=y4m_+beh8bsc9CbcfPiGfUOtgz530HQ@mail.gmail.com> (raw)
In-Reply-To: <7BB30632-15BE-4EF8-B84F-D35A27772F18@dell.com>

2014-10-16 18:03 GMT+03:00  <Paul_Koning@dell.com>:
> Is that the handler for a breakpoint?  Does the completion of the “si” command invoke the breakpoint handler?  If yes, that’s 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.


  reply	other threads:[~2014-10-16 15:15 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
     [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 [this message]
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='CAMQQO3mfg3Q9ij14XJ=y4m_+beh8bsc9CbcfPiGfUOtgz530HQ@mail.gmail.com' \
    --to=omeragacan@gmail.com \
    --cc=Paul_Koning@dell.com \
    --cc=gdb@sourceware.org \
    --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