News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Debugger under Gentoo

Started by moloh, May 15, 2006, 09:37:33 PM

Previous topic - Next topic

moloh

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

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

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):


--- 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

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

Any other idea how this can be done without sources hacking? The resolution is nice, but rather problematic for wide use.