By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,383 Members | 2,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,383 IT Pros & Developers. It's quick & easy.

Python GDB Wrapper

P: n/a
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.
Mar 7 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Fri, Mar 7, 2008 at 4:01 AM, Raja <ro********@gmail.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.
--
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.
Mar 7 '08 #2

P: n/a
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
Mar 7 '08 #3

P: n/a
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. Lwis" <mar...@v.loewis.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
Mar 7 '08 #4

P: n/a
On Mar 7, 1:21 pm, Raja <rokkamr...@gmail.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. Lwis" <mar...@v.loewis.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.
Mar 7 '08 #5

P: n/a
Raja,

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

On Fri, Mar 7, 2008 at 2:11 PM, Raja <ro********@gmail.comwrote:
On Mar 7, 1:21 pm, Raja <rokkamr...@gmail.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. Lwis" <mar...@v.loewis.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.
--
http://mail.python.org/mailman/listinfo/python-list
Mar 7 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.