public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/14916] New: Segmentation fault when running python script
@ 2012-12-04 15:27 daniel.zaoui at yahoo dot com
  2012-12-05 11:59 ` [Bug gdb/14916] " pmuldoon at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: daniel.zaoui at yahoo dot com @ 2012-12-04 15:27 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14916

             Bug #: 14916
           Summary: Segmentation fault when running python script
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: daniel.zaoui@yahoo.com
    Classification: Unclassified


In .gdbinit, I source the following python file eo_step.py (prints are
temporary here for debug):
class Eo_step(gdb.Command):
   def __init__(self):
      print "11"
      gdb.Command.__init__(self, "eo_step", gdb.COMMAND_OBSCURE)
      print "12"

   def invoke (self, arg, from_tty):
      print "21"
      while True:
         print "22"
         gdb.execute("step")
         print "23"
         self.priv_filename = gdb.selected_frame().find_sal().symtab.filename
         print "24"
         self.priv_function = gdb.selected_frame().function()
         print "25"
         if (self.priv_filename != "lib/eo/eo.c") and (self.priv_function !=
None):
            print "26"
            break
         if (self.priv_filename == "lib/eo/eo.c"):
            print "27"
            gdb.execute("step")
         if (self.priv_function == None):
            print "28"
            gdb.execute("finish")
Eo_step()

I run gdb with my program and put a breakpoint on a specific function that is
supposed to call a function of the file eo.c. Then I run it and it stops on the
breakpoint.
I run my eo_step command that will step while the current function is in eo.c
or the function is None (it is used for the moment to jump over functions like
memcpy).
When I run my program from the beginning (without exiting gdb), it stops as
expected at the breakpoint. When I run eo_step, a segfault occurs.
The last number I see in the terminal is 24, i.e supposed to fail just after.

Thank you for your help
Daniel

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/14916] Segmentation fault when running python script
  2012-12-04 15:27 [Bug gdb/14916] New: Segmentation fault when running python script daniel.zaoui at yahoo dot com
@ 2012-12-05 11:59 ` pmuldoon at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: pmuldoon at redhat dot com @ 2012-12-05 11:59 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14916

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |pmuldoon at redhat dot com
         Resolution|                            |DUPLICATE
   Target Milestone|---                         |7.6

--- Comment #1 from Phil Muldoon <pmuldoon at redhat dot com> 2012-12-05 11:59:56 UTC ---
I investigated this and I can conform that it does create a segfault in GDB
7.5.  However in the upstream GDB version, it does not.  As it happens this has
already been fixed here:

http://sourceware.org/bugzilla/show_bug.cgi?id=14634

So the next version of GDB released should have this fix.  If you feel this bug
is not the same, or, after using the next version of GDB that this problem
remains, please feel free to reopen this bug.

*** This bug has been marked as a duplicate of bug 14634 ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-05 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04 15:27 [Bug gdb/14916] New: Segmentation fault when running python script daniel.zaoui at yahoo dot com
2012-12-05 11:59 ` [Bug gdb/14916] " pmuldoon at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).