Python GDB Wrapper

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Raja

    #1

    Python GDB Wrapper

    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.
  • Daniel Bonekeeper

    #2
    Re: Python GDB Wrapper

    On Fri, Mar 7, 2008 at 4:01 AM, Raja <rokkamraja@gma il.comwrote:
    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.
    --

    >
    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.

    Comment

    • =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

      #3
      Re: Python GDB Wrapper

      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

      Comment

      • Raja

        #4
        Re: Python GDB Wrapper

        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" <mar...@v.loewi s.dewrote:
        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

        Comment

        • Raja

          #5
          Re: Python GDB Wrapper

          On Mar 7, 1:21 pm, Raja <rokkamr...@gma il.comwrote:
          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" <mar...@v.loewi s.dewrote:
          >
          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.

          Comment

          • Navtej Singh

            #6
            Re: Python GDB Wrapper

            Raja,

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

            On Fri, Mar 7, 2008 at 2:11 PM, Raja <rokkamraja@gma il.comwrote:
            On Mar 7, 1:21 pm, Raja <rokkamr...@gma il.comwrote:
            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" <mar...@v.loewi s.dewrote:
            >
            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.
            >
            >
            --

            >

            Comment

            Working...