473,883 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.
Mar 7 '08 #1
5 3402
On Fri, Mar 7, 2008 at 4:01 AM, Raja <ro********@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.
--
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
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
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
Mar 7 '08 #4
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.
Mar 7 '08 #5
Raja,

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

On Fri, Mar 7, 2008 at 2:11 PM, Raja <ro********@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.
--
http://mail.python.org/mailman/listinfo/python-list
Mar 7 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4283
by: JW | last post by:
Hi, Below is a description of what I would like to do. Would someone tell me if it is possible and if so, how? I have an array (presumably 'large') that is mallocced in a C function and its values are initialized in that same function. I would like to pass just the pointer to the beginning of the array
5
2263
by: Gary | last post by:
Hi- I've been searching the web for a while and I've been unable to find a way to access c data objects in python without using SWIG. I can do methods just fine but I can't access variables. It seems like PyModule_AddObject should work but it segfaults my program. There's a good chance I'm just using it wrong, or I should be using something else. Could someone give me a simple, complete example pretty please? Thanks!
25
2157
by: Allenabethea | last post by:
Jython is 100% java coded python. Python objects work with javacompilers and Virtual machines. I am a hobby programmer so the technical reasons are probably beyond me... Why is python incompatible with .net? Why can't python be coded in C#? I see the the MONO project on linux/unix is advancing. .Net seems to be a juggernaut especially if programmers will be able to use their favorite(most productive) language to program in. (every...
4
2786
by: Edvard Majakari | last post by:
Hi, I was wondering what would be the most elegant way for creating a Python class wrapper for a command line utility, which takes three types of arguments: 1. options with values (--foo=bar) 2. boolean options (--squibble) 3. data lines (MUNGE:x:y:z:frob)
4
2746
by: Randall Hopper | last post by:
What is the correct way to propagate exceptions from Python callbacks? When I do this: Python -> C++ -> Python Callback (example attached) an exception raised in the callback doesn't make it back across C++ to Python. It appears that PyGILState_Release() at the bottom of the callback
14
2753
by: Java and Swing | last post by:
static PyObject *wrap_doStuff(PyObject *self, PyObject *args) { // this will store the result in a Python object PyObject *finalResult; // get arguments from Python char *result = 0; char *in= 0; char *aString = 0; char *bString = 0; MY_NUM *a;
2
3106
by: GinTon | last post by:
EyeDB is a free ODBMS based on the ODMG 3 specification with programming interfaces for C++ and Java. It is very powerfull, mature, safe and stable. In fact, it was developed in 1992 for the Genome View project althought rewritten in 1994, and has been used in a lot of bioinformatics projects http://www.eyedb.org/ Python does not have any programming interface to ODBMS and I believe that it would be very interesting that the Python...
3
275
by: Daniel Fetchinson | last post by:
Does Python 2.5.2's embedded SQLite support full text searching? Sqlite itself is not distributed with python. Only a python db api compliant wrapper is part of the python stdlib and as such it is completely independent of the sqlite build. In other words, if your sqlite build supports full text searching you can use it through the python sqlite wrapper (that is part of the stdlib) and if it doesn't then not. This is true for any sqlite...
8
3286
by: Fett | last post by:
I am trying to find a wrapper to do linear programming within python. I am using an ubuntu machine and I have apt-get'd lp_solve, which works just fine. If someone knows of a wrapper that will work with that that'd be great. I also heard that scipy has a wrapper, however, I can't find any documentation on it, nor can I seem to find it with dir(). If anyone knows where there is good documentation on this I would love to use that (the...
1
2559
by: replysonika | last post by:
Hello, I run a Java app with subprocess from Python script. This python script is called from another Python Wrapper. python = subprocess.Popen(, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
0
9798
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10767
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10864
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7980
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6008
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.