Python GDB Wrapper

Discussion in 'Python' started by Raja, Mar 7, 2008.

  1. Raja

    Raja Guest

    Hi,
    I am trying to develop a a GDB wrapper script in python which is
    able to extract a stack trace and all relevant data.

    Has anyone does this before ? Even some basic idea or code as to how
    to proceed would be great.

    Thanks,
    Raja.
     
    Raja, Mar 7, 2008
    #1
    1. Advertising

  2. On Fri, Mar 7, 2008 at 4:01 AM, Raja <> wrote:
    > Hi,
    > I am trying to develop a a GDB wrapper script in python which is
    > able to extract a stack trace and all relevant data.
    >
    > Has anyone does this before ? Even some basic idea or code as to how
    > to proceed would be great.
    >
    > Thanks,
    > Raja.
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >


    You mean extract the information from core dump files that gdb interprets ?
    Check out stuff like ELF, Dwarf 3 (http://dwarf.freestandards.org/)
    and gdb sources.

    --
    What this world needs is a good five-dollar plasma weapon.
     
    Daniel Bonekeeper, Mar 7, 2008
    #2
    1. Advertising

  3. > Has anyone does this before ? Even some basic idea or code as to how
    > to proceed would be great.


    Have you seen Misc/gdbinit?

    Regards,
    Martin
     
    Martin v. Löwis, Mar 7, 2008
    #3
  4. Raja

    Raja Guest

    Hi All,
    Thanks for replies. Daniel- I am looking at just a wrapper
    around GDB. I dont want to emulate the functionalities of GDB but
    instead use them in python scripting.
    Martin - Misc/gdbinit looks promising. Thanks a lot.

    Thanks,
    Raja.

    On Mar 7, 12:43 pm, "Martin v. Löwis" <> wrote:
    > > Has anyone does this before ? Even some basic idea or code as to how
    > > to proceed would be great.

    >
    > Have you seen Misc/gdbinit?
    >
    > Regards,
    > Martin
     
    Raja, Mar 7, 2008
    #4
  5. Raja

    Raja Guest

    On Mar 7, 1:21 pm, Raja <> wrote:
    > Hi All,
    > Thanks for replies. Daniel- I am looking at just a wrapper
    > around GDB. I dont want to emulate the functionalities of GDB but
    > instead use them in python scripting.
    > Martin - Misc/gdbinit looks promising. Thanks a lot.
    >
    > Thanks,
    > Raja.
    >
    > On Mar 7, 12:43 pm, "Martin v. Löwis" <> wrote:
    >
    > > > Has anyone does this before ? Even some basic idea or code as to how
    > > > to proceed would be great.

    >
    > > Have you seen Misc/gdbinit?

    >
    > > Regards,
    > > Martin


    Hi All,
    Marting- I looked at the Misc/gdbinit but what I want is a Python
    module which wraps around GDB and exposes its functionality, which has
    some methods in it like pystack to which if I give the arguments as
    program name and arguments displays the stack trace of that particular
    program .

    Thanks,
    Raja.
     
    Raja, Mar 7, 2008
    #5
  6. Raja

    Navtej Singh Guest

    Raja,

    Check this http://fusil.hachoir.org/trac/wiki/Ptrace [gdb.py]

    On Fri, Mar 7, 2008 at 2:11 PM, Raja <> wrote:
    > On Mar 7, 1:21 pm, Raja <> wrote:
    > > Hi All,
    > > Thanks for replies. Daniel- I am looking at just a wrapper
    > > around GDB. I dont want to emulate the functionalities of GDB but
    > > instead use them in python scripting.
    > > Martin - Misc/gdbinit looks promising. Thanks a lot.
    > >
    > > Thanks,
    > > Raja.
    > >
    > > On Mar 7, 12:43 pm, "Martin v. Löwis" <> wrote:
    > >
    > > > > Has anyone does this before ? Even some basic idea or code as to how
    > > > > to proceed would be great.

    > >
    > > > Have you seen Misc/gdbinit?

    > >
    > > > Regards,
    > > > Martin

    >
    > Hi All,
    > Marting- I looked at the Misc/gdbinit but what I want is a Python
    > module which wraps around GDB and exposes its functionality, which has
    > some methods in it like pystack to which if I give the arguments as
    > program name and arguments displays the stack trace of that particular
    > program .
    >
    > Thanks,
    > Raja.
    >
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
     
    Navtej Singh, Mar 7, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Wilkinson

    Debugging Python extensions with gdb

    Andrew Wilkinson, Jul 9, 2004, in forum: Python
    Replies:
    1
    Views:
    418
    Andrew Wilkinson
    Jul 9, 2004
  2. Skip Montanaro
    Replies:
    0
    Views:
    489
    Skip Montanaro
    Nov 21, 2004
  3. Surendra
    Replies:
    0
    Views:
    534
    Surendra
    Mar 23, 2006
  4. seba
    Replies:
    1
    Views:
    1,510
    mlimber
    Mar 22, 2007
  5. Timothy Madden
    Replies:
    1
    Views:
    1,722
    Timothy Madden
    Sep 17, 2009
Loading...

Share This Page