Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem with .gdbinit
Problem with .gdbinit [message #780799] Thu, 19 January 2012 12:32 Go to next message
Harry Houdini is currently offline Harry HoudiniFriend
Messages: 142
Registered: February 2010
Senior Member
Hello,

First of all, I'm coming from Windows, and I'm not used at all to gdb.

Here is my .gdbinit file :

python
import sys
sys.path.insert(0, '/usr/share/gcc-4.5.1/python/libstdcxx/v6')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end


printers.py is in /usr/share/gcc-4.5.1/python/libstdcxx/v6

When I run gdb on the command line, and execute each instruction, I have no problem :

(gdb) python
>import sys
>sys.path.insert(0, '/usr/share/gcc-4.5.1/python/libstdcxx/v6')
>from libstdcxx.v6.printers import register_libstdcxx_printers
>register_libstdcxx_printers (None)
>end
(gdb) quit


But when I want to use it from Eclipse CDT, I get the follwong message :
Error in final launch sequence
Failed to execute MI command:
source ~/.gdbinit
Error message from debugger back end:
/users/stepvand/.gdbinit:6: Error in sourced command file:
Error while executing Python code.
/users/stepvand/.gdbinit:6: Error in sourced command file:
Error while executing Python code.

[Updated on: Thu, 19 January 2012 12:34]

Report message to a moderator

Re: Problem with .gdbinit [message #780816 is a reply to message #780799] Thu, 19 January 2012 13:55 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Hmm, this works for me. Do you have different gdb versions installed? Which one is called by Eclipse?

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Problem with .gdbinit [message #780818 is a reply to message #780816] Thu, 19 January 2012 14:02 Go to previous messageGo to next message
Harry Houdini is currently offline Harry HoudiniFriend
Messages: 142
Registered: February 2010
Senior Member
I have only one gdb : 7.2-50.e16.

How to know what gdb does Eclipse call ?
Re: Problem with .gdbinit [message #780822 is a reply to message #780818] Thu, 19 January 2012 14:12 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
How to know what gdb does Eclipse call ?

Preferences->C/C++->Debug->GDB
Here you set the path.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Problem with .gdbinit [message #780825 is a reply to message #780822] Thu, 19 January 2012 14:21 Go to previous message
Harry Houdini is currently offline Harry HoudiniFriend
Messages: 142
Registered: February 2010
Senior Member
It wasn't at all a stupid question : the path was configured to a directory which doesn't exist anymore. It was created when I tried other gdb versions to resolve that other problem...

But the message was not so clear...

Thanks a lot.

[Updated on: Thu, 19 January 2012 14:22]

Report message to a moderator

Previous Topic:What is the difference between DOM and PDOM?
Next Topic:Multiple markers on end brace
Goto Forum:
  


Current Time: Sat May 11 14:57:48 GMT 2024

Powered by FUDForum. Page generated in 0.03641 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top