Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem with .gdbinit
Problem with .gdbinit [message #780799] Thu, 19 January 2012 07:32 Go to next message
Eclipse UserFriend
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 07:34] by Moderator

Re: Problem with .gdbinit [message #780816 is a reply to message #780799] Thu, 19 January 2012 08:55 Go to previous messageGo to next message
Eclipse UserFriend
Hmm, this works for me. Do you have different gdb versions installed? Which one is called by Eclipse?
Re: Problem with .gdbinit [message #780818 is a reply to message #780816] Thu, 19 January 2012 09:02 Go to previous messageGo to next message
Eclipse UserFriend
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 09:12 Go to previous messageGo to next message
Eclipse UserFriend
Quote:
How to know what gdb does Eclipse call ?

Preferences->C/C++->Debug->GDB
Here you set the path.
Re: Problem with .gdbinit [message #780825 is a reply to message #780822] Thu, 19 January 2012 09:21 Go to previous message
Eclipse UserFriend
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 09:22] by Moderator

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


Current Time: Mon Jul 07 11:44:05 EDT 2025

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

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

Back to the top