User forums > Nightly builds

The 06 January 2009 build (5382) is out.

<< < (3/16) > >>

ollydbg:
Thanks jens.
I have this option enable by default.
see the attachment image.

I also enable the full compiler output, when compiling, the output are here:

--- Code: ----------------- Build: TestDLL in cb_debug_test ---------------

[ 50.0%] mingw32-g++.exe -Wall -g     -ID:\SourceCode\Libraries\wxWidgets2.8\src\msw  -c C:\DebugTest\TestDLL\dllmain.cpp -o .objs\TestDLL\dllmain.o
[100.0%] mingw32-g++.exe -shared  -Wl,--out-implib=bin\libTestDLL.a -Wl,--dll  .objs\TestDLL\dllmain.o   -o bin\TestDLL.dll 
Creating library file: bin\libTestDLL.a
Output size is 22.46 KB

-------------- Build: TestApp in cb_debug_test ---------------

[ 50.0%] mingw32-g++.exe -Wall -g     -I. -ID:\SourceCode\Libraries\wxWidgets2.8\src\msw  -c C:\DebugTest\TestApp\main.cpp -o .objs\TestApp\main.o
C:\DebugTest\TestApp\main.cpp: In function 'void LoadDllPlugin()':
C:\DebugTest\TestApp\main.cpp:103: warning: unused variable 'status'
[100.0%] mingw32-g++.exe  -o bin\TestApp.exe .objs\TestApp\main.o     -mwindows
Output size is 32.17 KB
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 1 warnings

--- End code ---


When debugging the exe file, I still can't set break point in anywhere in the "dllmain.cpp".
If you have enough time, you could help to test the zip file in that thread. Thanks.
http://forums.codeblocks.org/index.php?action=dlattach;topic=4896.0;attach=1707


correct!  setting break points in the code below works!


--- Code: ---// a sample exported function
void __declspec(dllexport) MyFunction(const LPCSTR sometext)
{
    /** SET BREAK POINT HERE VVVVVVVVVVV **/
    MessageBoxA(0, sometext, "DLL Message", MB_OK | MB_ICONINFORMATION);
    /** SET BREAK POINT HERE ^^^^^^^^^^^^ **/
}


--- End code ---

The breakpoints can't be set in the function of DllMain.



[attachment deleted by admin]

Jenna:

--- Quote from: ollydbg on January 07, 2009, 06:36:58 pm ---The breakpoints can't be set in the function of DllMain.

--- End quote ---

I can set breakpoints in any of the three functions dllmain.cpp and in MyFunction without problems.
And gdb stops there of course.

g++ is 4.2.1-dw2:

--- Code: ---C:\Dokumente und Einstellungen\jens>g++ -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.2.1-2-src/configure --with-gcc --enable-libgomp --host=mingw32 --build=mingw32 --target=mingw32 --prog
ram-suffix=-dw2 --with-arch=i486 --with-tune=generic --disable-werror --prefix=/mingw --with-local-prefix=/mingw --enable-thread
s --disable-nls --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-win32-registry --disable-sjlj-exceptions --enable-li
bstdcxx-debug --enable-cxx-flags=-fno-function-sections -fno-data-sections --enable-version-specific-runtime-libs --disable-boot
strap
Thread model: win32
gcc version 4.2.1-dw2 (mingw32-2)
--- End code ---

gdb is 6.7.50 on my XP partition:

--- Code: ---GNU gdb 6.7.50.20071127
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".

--- End code ---

Iwill test it with gdb 6.8 on w2k too, this evening.

MortenMacFly:

--- Quote from: jens on January 07, 2009, 07:36:46 pm ---I can set breakpoints in any of the three functions dllmain.cpp and in MyFunction without problems.
And gdb stops there of course.

--- End quote ---
For me it still does not work. But I am using the GCC 3.4.5 compiler suite ang GDB 6.6 (otherwise I cannot debug into wx code). It seems an issue with the compiler/debugger version obviously... Oh dear... Should I really finally upgrade my dev frameworks?!

ollydbg:
It is very interesting, when I renamed the project folder name from "C:\DebugTest" to "C:\DebugTest1".
Then I open the cbp file and debug without rebuild the project. Then the gdb complaint that: (I'm using the TDM-mingw version)


--- Code: ---Command-line: D:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname  -quiet -args bin/TestApp.exe
Working dir : C:\DebugTest1\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "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 disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Function "__cxa_throw" not defined in loaded symbols.
>>>>>>cb_gdb:
> show directories
Source directories searched: $cdir;$cwd
>>>>>>cb_gdb:
> directory C:/DebugTest1/
>>>>>>cb_gdb:
> break "C:/DebugTest1/TestApp/main.cpp:26"
No source file named C:/DebugTest1/TestApp/main.cpp in loaded symbols.
Breakpoint 1 ("C:/DebugTest1/TestApp/main.cpp:26) pending.
>>>>>>cb_gdb:

--- End code ---

You can see when gdb started, it use the command line:

--- Code: ---Command-line: D:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname  -quiet -args bin/TestApp.exe

--- End code ---

which has a parameter "-fullname", so I can't set break points in anywhere of the source file. Because the debug information in both exe and DLL file were reference to " C:\DebugTest\***".
As a workaround, I should rebuild the Target.




Loaden:

--- Code: ------ src/plugins/compilergcc/compilerMINGWgenerator.cpp  (revision 5387)
+++ src/plugins/compilergcc/compilerMINGWgenerator.cpp  (working copy)
@@ -36,7 +36,10 @@
     wxString result = CompilerCommandGenerator::SetupIncludeDirs(compiler, target);
     m_VerStr = compiler->GetVersionString();
     wxString pch_prepend;
-    bool IsGcc4 = m_VerStr.Left(1).IsSameAs(_T("4"));
+//    bool IsGcc4 = m_VerStr.Left(1).IsSameAs(_T("4"));
+    // MinGW TDM 4.3.2-2: http://www.tdragon.net/recentgcc/
+    // compiler->GetVersionString() return is empty string
+    bool IsGcc4 = true;

     // for PCH to work, the very first include dir *must* be the object output dir
     // *only* if PCH is generated in the object output dir
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version