User forums > General (but related to Code::Blocks)

[OT] unofficial MinGW GDB gdb with python released

<< < (12/35) > >>

nanyu:

--- Quote from: ollydbg on October 14, 2009, 07:36:26 am ---Hi, all, from the MinGW mail list, the new updated GDB.exe 7.02 is released, and the "setting bp issue on dll" is gone.

--- End quote ---


The GDB 7.02 can not work well with my project (a exe with named Demo2 and a dll named Tutorial04):


--- Code: ---> set prompt >>>>>>cb_gdb:
Reading symbols from F:\TC_Project\presearch\Demo2/bin/Debug/Demo2.exe...
done.
(gdb)
>>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.0
Copyright (C) 2009 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>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
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source E:\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> handle SIGTRAP noprint
>>>>>>cb_gdb:
> directory F:/TC_Project/presearch/Tutorial04/
>>>>>>cb_gdb:
> directory F:/TC_Project/presearch/Demo2/
>>>>>>cb_gdb:
> break "F:/TC_Project/presearch/Demo2/Demo2Main.cpp:541"
Breakpoint 2 at 0x4082dc: file F:\TC_Project\presearch\Demo2\Demo2Main.cpp, line 541.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 920.0x404]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

--- End code ---

sometime ,I got :

--- Code: ---/*same as about*/
> run
gdb: windows_init_thread_list
[New Thread 4364.0x17b4]
WINDOWS\system32\winmm.dll" at 0x76b10000.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

--- End code ---

--------
I have test It work well if use gdb-6.8 .

--------
code::blocks 5911 + mingw32 gcc 4.4.0 /windows xp / gdb 7.02

ollydbg:

--- Quote from: nanyu on November 17, 2009, 03:12:58 am ---
--- Quote from: ollydbg on October 14, 2009, 07:36:26 am ---Hi, all, from the MinGW mail list, the new updated GDB.exe 7.02 is released, and the "setting bp issue on dll" is gone.

--- End quote ---


The GDB 7.02 can not work well with my project (a exe with named Demo2 and a dll named Tutorial04):


--- Code: ---> set prompt >>>>>>cb_gdb:
Reading symbols from F:\TC_Project\presearch\Demo2/bin/Debug/Demo2.exe...
done.
(gdb)
>>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.0
Copyright (C) 2009 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>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
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source E:\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> handle SIGTRAP noprint
>>>>>>cb_gdb:
> directory F:/TC_Project/presearch/Tutorial04/
>>>>>>cb_gdb:
> directory F:/TC_Project/presearch/Demo2/
>>>>>>cb_gdb:
> break "F:/TC_Project/presearch/Demo2/Demo2Main.cpp:541"
Breakpoint 2 at 0x4082dc: file F:\TC_Project\presearch\Demo2\Demo2Main.cpp, line 541.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 920.0x404]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

--- End code ---

--------
I have test It work well if use gdb-6.8 .

--------
code::blocks 5911 + mingw32 gcc 4.4.0 /windows xp / gdb 7.02


--- End quote ---

So, what's the problem? From the debugger log, it seems the GDB exit abnormally? Could you supply a test case?
At least it works on my test case of EXE and DLL project.

nanyu:

--- Quote from: ollydbg on November 17, 2009, 03:20:43 am ---...
So, what's the problem? From the debugger log, it seems the GDB exit abnormally? Could you supply a test case?
At least it works on my test case of EXE and DLL project.

--- End quote ---

1, New a  "SDL project" (by c::b's project template), named the project "SDL_WinMM_GDBTest" .

2, Add a new target named "DLL_Debug", and add the complie option -D_BUILD_DLL_.

3, modify the main.cpp, and build the "DLL_Debug" target.

--- Code: ---#if defined(_BUILD_DLL_)
int dll_main( int argc, char** argv )
#else
int main ( int argc, char** argv )
#endif
{
   ...
}

--- End code ---

4, Create a C++ Console Project (by c::b's project template) , named "CallSDL_WinMM_GDBTest".

5, Add  a new  "Virtual target" to "CallSDL_WinMM_GDBTest" which alials is "DLL_Debug" and "Build targets contained": Debug.

6, the main.cpp for "CallSDL_WinMM..."

--- Quote ---#include <iostream>
using namespace std;

int dll_main( int argc, char** argv );
int main(int argc, char** argv )
{
    dll_main(argc, argv);
   
    return 0;
}

--- End quote ---

7, Add two lib to CallDLL_WinMM_GDBTest's "Link libraries "
   SDL_WinMM_GDBTest.dll
   SDL

8, then add the linke search path...

9, build CallDLL_Win_GDBTest.exe , run it. It looks everythink OK, now.

10, Prerss F8, then the error message occurrences in Debugger(debug) log panel :
   
--- Code: ---Command-line: E:\MinGW\bin\gdb.exe -nx -fullname  -quiet -args bin/Debug/CallSDL_WinMM_GDBTest.exe
Working dir : C:\Documents and Settings\ZhuangYanDell\My Documents\CodeBlocks Projects\CallSDL_WinMM_GDBTest\
> set prompt >>>>>>cb_gdb:
Reading symbols from C:\Documents and Settings\ZhuangYanDell\My Documents\CodeBlocks Projects\CallSDL_WinMM_GDBTest/bin/Debug/CallSDL_WinMM_GDBTest.exe...
done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.0
Copyright (C) 2009 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>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:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source E:\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> handle SIGTRAP noprint
>>>>>>cb_gdb:
> directory C:/DOCUME~1/ZHUANG~1/MYDOCU~1/CODEBL~1/SDL_WI~1/
>>>>>>cb_gdb:
> directory C:/DOCUME~1/ZHUANG~1/MYDOCU~1/CODEBL~1/CALLSD~1/
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 5708.0x114c]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

--- End code ---

EDIT : I guess:  CallSDL_WinMM_GDBTest---call-->SDL_WinMM_GDBTest---call-->SDL.dll---call--->WinMM.dll. then the error occurrence.

ollydbg:
Ok, too many steps. :? In fact, I have no experience of "SDL"...

I will test it.

By the way:would you mind to upload your project?

You can also try the project I uploaded in this message:
http://forums.codeblocks.org/index.php/topic,11301.msg77123.html#msg77123

Edit: Oh, my God, I need to setup a SDL build environment(headers, libraries...), tough for me...

nanyu:

--- Quote from: ollydbg on November 17, 2009, 04:22:23 am ---Ok, too many steps. :? In fact, I have no experience of "SDL"...

I will test it.

By the way:would you mind to upload your project?

You can also try the project I uploaded in this message:
http://forums.codeblocks.org/index.php/topic,11301.msg77123.html#msg77123

Edit: Oh, my God, I need to setup a SDL build environment(headers, libraries...), tough for me...

--- End quote ---

1. download the sdl source here and unzip it.
2. starut msys , cd the sdl source dir
3. ./configure  -> make -> make install
4. in c::b, add a new global var : sdl
   copy include to $sdl.include
   copy /local/bin and local/lib  to $sdl.lib   

EDIT here is the test project package : sdl_gdb_dll_test

thanks you!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version