Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python GDB Wrapper

Reply
Thread Tools

Python GDB Wrapper

 
 
Raja
Guest
Posts: n/a
 
      03-07-2008
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.
 
Reply With Quote
 
 
 
 
Daniel Bonekeeper
Guest
Posts: n/a
 
      03-07-2008
On Fri, Mar 7, 2008 at 4:01 AM, Raja <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
Martin v. L÷wis
Guest
Posts: n/a
 
      03-07-2008
> 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
 
Reply With Quote
 
Raja
Guest
Posts: n/a
 
      03-07-2008
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" <(E-Mail Removed)> 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


 
Reply With Quote
 
Raja
Guest
Posts: n/a
 
      03-07-2008
On Mar 7, 1:21 pm, Raja <(E-Mail Removed)> 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" <(E-Mail Removed)> 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.
 
Reply With Quote
 
Navtej Singh
Guest
Posts: n/a
 
      03-07-2008
Raja,

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

On Fri, Mar 7, 2008 at 2:11 PM, Raja <(E-Mail Removed)> wrote:
> On Mar 7, 1:21 pm, Raja <(E-Mail Removed)> 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" <(E-Mail Removed)> 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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging with gdb: pystack macro for gdb to show python stack trace Timothy Madden Python 1 09-17-2009 11:47 AM
GDB - no debugging symbols found (GDB Vs GCC?) seba C++ 1 03-22-2007 02:02 PM
Capturing gdb output in pyhton script using gdb -batch -x arguments Surendra Python 0 03-23-2006 02:47 PM
enhanced gdbinit file - looking for Python+Emacs+gdb users Skip Montanaro Python 0 11-21-2004 04:49 AM
Debugging Python extensions with gdb Andrew Wilkinson Python 1 07-09-2004 07:02 PM



Advertisments