Author Topic: rev 4185 Debuger Can't found source file(old rev 3170 no this problem)  (Read 6287 times)

Offline lizhuoyi

  • Multiple posting newcomer
  • *
  • Posts: 13
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:


Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
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.

Offline lizhuoyi

  • Multiple posting newcomer
  • *
  • Posts: 13
OS : Windows Xp
Compiler: mingw32-gcc 3.4.5
gdb:  gdb-6.3.2

thanks

[attachment deleted by admin]

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
OS : Windows Xp
Compiler: mingw32-gcc 3.4.5
gdb:  gdb-6.3.2

thanks

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 ?

Offline lizhuoyi

  • Multiple posting newcomer
  • *
  • Posts: 13
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]

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
my Debugger(debug) log shows the same as your's

the breakpoint is obviously set and catched by gdb but
the problem is somehow in CB calculating the proper path to the source file.
it looks that this is somehow related to the Chinese XP,
sorry but i can't test this, couse i only have a german and an englisch XP.

Offline lizhuoyi

  • Multiple posting newcomer
  • *
  • Posts: 13
Thank you,l think gdb plugin or wxWidgets-2.8.4 casuse this problem,I'll try resolve it.

Offline lizhuoyi

  • Multiple posting newcomer
  • *
  • Posts: 13
It is not a general issue,it is my problem
I modify my cygdrive prefix,I use "/" replace "/cygdrive"(because MSYS use /c,I want use same path in cygwin and MSYS).
But the GDB_driver::CorrectCygwinPath cann't identify this characterless prefix.

thanks tiwag