User forums > Using Code::Blocks

rev 4185 Debuger Can't found source file(old rev 3170 no this problem)

(1/2) > >>

lizhuoyi:
I create a simple console project at c:\EccStudio\cb\test1,
the debuger said Cannot open file: C:\EccStudio\cb\test1\EccStudio\cb\test1\main.c

/*****Debug*****/
Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: C:\EccStudio\cb\test1\
Adding source dir: C:\EccStudio\cb\test1\
Adding file: bin\Debug\test1.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.3
Child process PID: 704
Cannot open file: C:\EccStudio\cb\test1\EccStudio\cb\test1\main.c
At :EccStudio/cb/test1/main.c:6

/****main.c****/
#include <stdio.h>
#include <stdlib.h>

int main()
{
   printf("Hello world!\n");
   return 0;
}

/****Debuger(debug)****/
Command-line: C:\EccStudio\msys\mingw\bin\gdb.exe -nx -fullname  -quiet -args bin/Debug/test1.exe
Working dir : C:\EccStudio\cb\test1\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> directory C:/EccStudio/cb/test1/
>>>>>>cb_gdb:
> break "C:/EccStudio/cb/test1/main.c:6"
Breakpoint 1 at 0x40131a: file main.c, line 6.
>>>>>>cb_gdb:
> run
Breakpoint 1, main () at main.c:6
C:/EccStudio/cb/test1/main.c:6:58:beg:0x40131a
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:

tiwag:
it can't be a general issue, my CB rev 4186 runs fine with debugging
even a more complex project (like CB) can be debugged without problems.

plase check your project settings again or attach your project here,
so that we can have look what's going wrong.

lizhuoyi:
OS : Windows Xp
Compiler: mingw32-gcc 3.4.5
gdb:  gdb-6.3.2

thanks

[attachment deleted by admin]

tiwag:

--- Quote from: lizhuoyi on June 27, 2007, 08:43:50 am ---OS : Windows Xp
Compiler: mingw32-gcc 3.4.5
gdb:  gdb-6.3.2

thanks

--- End quote ---

weird - your project is standard without any special settings and it works with my config (same as yours)
also yout debug log shows that the debugger has found the main.c file and the breakpoint was set successfully

does this problem happen with all of your projects or just with this particular one ?

lizhuoyi:
all projects
When I update CB form rev 3964 my project cann't debug,so I create this simple project.
Maybe this problem produce by my Simple Chinese Windows Xp.

rev 3170 correct display next line
C:/EccStudio/cb/test1/main.c:6:58:beg:0x40131a

rev 4185 didn't display (0x1a0x1a)
see attachment


[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version