Author Topic: Debugger under Gentoo  (Read 4852 times)

moloh

  • Guest
Debugger under Gentoo
« on: May 15, 2006, 09:37:33 pm »
Hello!
And new problem arise. After few days of fight with codeblocks i got to test the debugger and it doesn't work. Problem? no sources found whe set a breakpoint, You use relative paths to set breakpoints. May i ask why? Could You use the absolute path? I tried on gdb 6.3 and 6.4 available in Gentoo Portage but no luck. Any ideas what can i do to make it work?

moloh

  • Guest
Re: Debugger under Gentoo
« Reply #1 on: May 17, 2006, 07:06:04 pm »
As i made some testing problem is exactly as this: Breakpoint can be created (file is found) if they are in the root directory of project (like in templates), but when i use more complicated project structure (like use of src directory where i hold sources and headers) then "no sources found" messege is issued by gdb for source file where breakpoint should be created(like "src/main.c"). Anyone have an idea how can i overcome this problem?

scaught

  • Guest
Re: Debugger under Gentoo
« Reply #2 on: May 21, 2006, 04:39:57 am »
Hi - I had the same problem (all my source files are in src/ and below...) and created a patch that seems to solve the problem (for me, at least):

Code
--- codeblocks-9999/src/plugins/debuggergdb/debuggergdb.cpp     2006-03-19 15:09:18.000000000 -0800
+++ codeblocks-9999/src/plugins/debuggergdb/debuggergdb.cpp     2006-03-19 15:08:35.000000000 -0800
@@ -950,9 +950,9 @@
 void DebuggerGDB::ConvertToGDBFile(wxString& str)
 {
     wxFileName fname = str;
-    str = fname.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
-    DebuggerGDB::ConvertToGDBDirectory(str);
-    str << fname.GetFullName();
+//    str = fname.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
+//    DebuggerGDB::ConvertToGDBDirectory(str);
+    str = fname.GetFullName();
 }

 // static

Using the ebuild from this post: http://forums.gentoo.org/viewtopic-t-440412.html you can create a file called something like 99_all_gdb-path.patch and just drop it in your /usr/local/portage/dev-util/codeblocks/files/patches directory, re-digest the ebuild, and then re-emerge.

Hope it helps...
-scott


moloh

  • Guest
Re: Debugger under Gentoo
« Reply #3 on: May 21, 2006, 11:17:59 pm »
Thanks.
This is exactly what i need, but for now i was to lazy to search for this and maintain this patch on my own overlay.

moloh

  • Guest
Re: Debugger under Gentoo
« Reply #4 on: June 02, 2006, 05:44:57 am »
Any other idea how this can be done without sources hacking? The resolution is nice, but rather problematic for wide use.