this is the 03 nov thread :
http://forums.codeblocks.org/index.php?topic=4368.0@Yiannis, I think we have a patch for this at berlios, could you have a look at it. If it is the one I have in mind, well then GDB 5.x support will be gone [well we used to tell we don't have 5.x support, recently we did have, maybe it's time again to not have ;-) ]
edit : this is the patch : not sure if it's the same problem, but worth looking at I guess : [ Patch #1658 ] Corrects the "No source file named" behavior when debugging :
https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1658&group_id=5358the introduction of
else
{
// for foreign files, we still should use a relative path
wxFileName f(filename);
f.MakeRelativeTo(prj->GetBasePath());
fname = f.GetFullPath();
}
cause the user who reported this to have the problem, but tiwag came up with another example where commenting out the above section doesn't help at all.
The mentioned patch does this in that particular area :
else
{
- // for foreign files, we still should use a relative path
+ // for foreign files, we should use an absolute path
wxFileName f(filename);
- f.MakeRelativeTo(prj->GetBasePath());
+ f.MakeAbsolute();
fname = f.GetFullPath();
+ fname.Replace(_T("\\"), _T("/"));
}
together with :
--- plugins/debuggergdb/gdb_driver.cpp (revision 3258)
+++ plugins/debuggergdb/gdb_driver.cpp (working copy)
@@ -22,7 +22,7 @@
static wxRegEx reThreadSwitch(_T("^\\[Switching to thread .*\\]#0[ \t]+(0x[A-z0-9]+) in (.*) from (.*)"));
static wxRegEx reThreadSwitch2(_T("^\\[Switching to thread .*\\]#0[ \t]+(0x[A-z0-9]+) in (.*) from (.*):([0-9]+)"));
#ifdef __WXMSW__
- static wxRegEx reBreak(_T("([A-z]:)([^:]+):([0-9]+):[0-9]+:[begmidl]+:(0x[0-9A-z]+)"));
+ static wxRegEx reBreak(_T("..([A-z]:)([^:]+):([0-9]+):[0-9]+:[begmidl]+:(0x[0-9A-z]+)"));
#else
static wxRegEx reBreak(_T("\032\032([^:]+):([0-9]+):[0-9]+:[begmidl]+:(0x[0-9A-z]+)"));
#endif
@@ -130,6 +130,7 @@
wxString cmd;
cmd << debugger;
cmd << _T(" -nx"); // don't run .gdbinit
+ cmd << _T(" -readnow "); // read symbol table immediately
cmd << _T(" -fullname "); // report full-path filenames when breaking
cmd << _T(" -quiet"); // don't display version on startup
cmd << _T(" -args ") << debuggee;
@@ -141,6 +142,7 @@
wxString cmd;
cmd << debugger;
cmd << _T(" -nx"); // don't run .gdbinit
+ cmd << _T(" -readnow "); // read symbol table immediately
cmd << _T(" -fullname "); // report full-path filenames when breaking
cmd << _T(" -quiet"); // don't display version on startup
cmd << _T(" -pid=") << wxString::Format(_T("%d"), pid);
@tiwag : if you have a spare moment could you check if your example works correct with the above mentioned patch ?