Bug #8949 2006-09-30 00:45
fpeque
I Known how reparate the code
The problem is a bug en GDB and nod in C::B.
After long and tries testing I fund: When the proyect is spawn in several directories and We wont add a source file in a diferent directory of the folder of proyect the GDB whit the full name and path, GDB can't found.
But if we write only the name whitout the paht the GDB works sussefully. (If prior we addd the directoryes like C::B does).
The solution is: in the file: "debuggergdb.cpp" in the folder: "src/plugins/debuggergdb/" of the source code of C::B eliminates the lines 990 and 991:
990 str = fname.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
991 DebuggerGDB::ConvertToGDBDirectory(str);
And Change 992 to:
992 str = fname.GetFullName();
The method: void DebuggerGDB::ConvertToGDBFile(wxString& str)
must be only:
void DebuggerGDB::ConvertToGDBFile(wxString& str)
{
wxFileName fname = str;
str << fname.GetFullName();
}
- Category
- Debugger
- Group
- Status
- Closed
- Close date
- 2007-06-17 05:33
- Assigned to
History
Does this bug still persist?
Hello everyone,
Thanks for the great work on Code::Blocks.
I'm working on a project with sources spawn in several directories and it happens that
the bug #8949 (maybe related to the #6756 one) persists in Code::Blocks SVN 3357 running on WXP SP2.
The compiler and debugger version that I'm using are:
-------
C:\>gcc --version
gcc (GCC) 3.4.5 (mingw special)
(...)
C:\>gdb --version
GNU gdb 6.3
(...)
This GDB was configured as "i686-pc-mingw32".
--------
Specifically, the program I'm debugging has some of its sources on the parent directory of the one it resides.
I've noticed that CB tries to set a breakpoint in a file outside the local directory using relative paths, but for some reason gdb doesn't accept them. For instance, an extract of the debugger(debug) log follows:
------
> break "../rep_gauss.cpp:347"
No source file named ../rep_gauss.cpp.
Breakpoint 1 ("../rep_gauss.cpp:347) pending.
------
In order to set up that breakpoint, I have used the "send user command to the debugger" command. The breakpoint had to be specified with just the filename and line number, without indicating a relative or absolute path. That works fine and prints the following lines in the debugger(debug) log:
------
> break "rep_gauss.cpp:347"
Breakpoint 4 at 0x6eae906e: file rep_gauss.cpp, line 347.
------
Maybe the problem is that gdb doesn't accept relative filenames with a leading ../
However, after the .. directory is added to the search path, the breakpoints can be set using the filename without any leading path.
If necessary, I may post a complete debugger(debug) log.
Thanks in advance for your time and consideration.
Report is closed.
Note: This is a preformatted standard message.
Possible reasons for closing this report are:
* the developer in charge of the issue
- could not reproduce it despite trying several times
- did not get sufficient information
- got no reply to an inquiry for specific information
* the report is quite a bit dated of now, and
- no user comments have been added for several weeks
- significant changes have been made to the code
- no other developer could reproduce it either
It is assumed that the problem does not persist and the report
can be closed.
If the problem reappears in future releases, please feel free to
re-open this report and provide precise information on how to
reproduce it.