Author Topic: [OT] unofficial MinGW GDB gdb with python released  (Read 169758 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] MinGW GDB 7.0 is released
« Reply #15 on: October 08, 2009, 03:22:59 pm »
But could you please test by setting a breakpoint in the codeblocks' source code? this case, it didn't work here.
Works fine, here.
I set a BP in C::B's "main" function -> stops.
While stopped I set a BP in a sub-method that'll be called certainly and hit continue -> stops.

For me all is OK?! (Using TDM 4.4.0, GDB 7.0 and C::B's debugger branch.)

BTW: Try really removing TDM before installing it freshly (from the single packages). Cause GDB7 has some files in different folders now.

Thanks for the hint. I have totally uninstall and remove the TDM.

Then, I just reinstall TDM , and upzip the GDB7.0 package(Note, GDB7.0 has four folders, so, I just let the GDB7.0's file overwrite the TDM's)

But, I still get the same error, things like:

Code: [Select]
>>>>>>cb_gdb:
> break "F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:588"
No source file named F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp.
Breakpoint 2 ("F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:588) pending.
>>>>>>cb_gdb:
> run
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: [OT] MinGW GDB 7.0 is released
« Reply #16 on: October 08, 2009, 03:47:56 pm »
Works fine, here.
I set a BP in C::B's "main" function -> stops.
While stopped I set a BP in a sub-method that'll be called certainly and hit continue -> stops.

ollydbg: Have your read the line in bold?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] MinGW GDB 7.0 is released
« Reply #17 on: October 08, 2009, 03:54:28 pm »
Works fine, here.
I set a BP in C::B's "main" function -> stops.
While stopped I set a BP in a sub-method that'll be called certainly and hit continue -> stops.

ollydbg: Have your read the line in bold?

Yes, I have read that, I also had tested that method.
I just set a breakpoint in the main function, which is in

F:\cb_svn\src\tools\ConsoleRunner\main.cpp

But it still can't stops there. :(

Code: [Select]

Working dir : F:\cb_svn\src\
> set prompt >>>>>>cb_gdb:
Reading symbols from F:\cb_svn\src/devel/codeblocks.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 F:\debugger_branch\src\output\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> cd devel
>>>>>>cb_gdb:
> directory F:/cb_svn/src/
>>>>>>cb_gdb:
> set args --debug-log --no-check-associations -ns -nd
>>>>>>cb_gdb:
> break "F:/cb_svn/src/tools/ConsoleRunner/main.cpp:84"
No source file named F:/cb_svn/src/tools/ConsoleRunner/main.cpp.
Breakpoint 2 ("F:/cb_svn/src/tools/ConsoleRunner/main.cpp:84) pending.
>>>>>>cb_gdb:
> run
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: [OT] MinGW GDB 7.0 is released
« Reply #18 on: October 08, 2009, 04:48:34 pm »
main should be in src/src/main.cpp not in the console runner :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: [OT] MinGW GDB 7.0 is released
« Reply #19 on: October 08, 2009, 04:59:51 pm »
F:\cb_svn\src\tools\ConsoleRunner\main.cpp
Harhar... :lol:

Well... try a BP src/src/main.cpp e.g. in the CreateIDE() method.

The main.cpp you pointed to will not work, obviously, as this is only the console_runner executable, not C::B itself. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] MinGW GDB 7.0 is released
« Reply #20 on: October 08, 2009, 05:01:51 pm »
main should be in src/src/main.cpp not in the console runner :)
My god... Big mistake...
Thanks, I will try this tomorrow, it's time to go to bed now. :wink:

Edit


But for gdb.exe 6.8.3, I don't need to  firstly set a breakpoint in the main(), I can directly set a breakpoint any where(for example tokenizer.cpp). :D
« Last Edit: October 08, 2009, 05:03:49 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: [OT] MinGW GDB 7.0 is released
« Reply #21 on: October 08, 2009, 05:18:28 pm »
But for gdb.exe 6.8.3, I don't need to  firstly set a breakpoint in the main(), I can directly set a breakpoint any where(for example tokenizer.cpp). :D
The same applied for GDB7. "main" was just an example. ;-) Good night! :P
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] MinGW GDB 7.0 is released
« Reply #22 on: October 09, 2009, 02:47:17 am »
@morten

Setting breakpoing at src\src\main.cpp, CreateIDE() works.
When the breakpoint above hitted. I still can't set breakpoint in tokenizer.cpp DoGetToken(). :(

Here is the log:

Code: [Select]
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 intel
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source D:\Program Files\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> cd devel
>>>>>>cb_gdb:
> directory F:/cb_svn/src/
>>>>>>cb_gdb:
> set args --debug-log --no-check-associations -ns -nd
>>>>>>cb_gdb:
> break "F:/cb_svn/src/src/main.cpp:631"
Breakpoint 2 at 0x429658: file F:\cb_svn\src\src\main.cpp, line 631.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
gdb: kernel event for pid=3348 tid=3508 code=CREATE_PROCESS_DEBUG_EVENT)
[New Thread 3348.0xdb4]
.......
ContinueDebugEvent (cpid=3348, ctid=3496, DBG_CONTINUE);
gdb: kernel event for pid=3348 tid=3508 code=EXCEPTION_DEBUG_EVENT)
Breakpoint 2, MainFrame::CreateIDE (this=0x3718af0) at F:\cb_svn\src\src\main.cpp:631
F:\cb_svn\src\src\main.cpp:631:32181:beg:0x429658
Current language:  auto
The current source language is "auto; currently c++".
>>>>>>cb_gdb:
> info locals
leftW = 200
clientsize = {
  x = 65055748,
  y = 62728
}
>>>>>>cb_gdb:
> info args
this = 0x3718af0
>>>>>>cb_gdb:
> whatis actual
No symbol "actual" in current context.
>>>>>>cb_gdb:
> output actual
No symbol "actual" in current context.
>>>>>>cb_gdb:
> whatis cashed_results_count
No symbol "cashed_results_count" in current context.
>>>>>>cb_gdb:
> output cashed_results_count
No symbol "cashed_results_count" in current context.
>>>>>>cb_gdb:
> whatis line
No symbol "line" in current context.
>>>>>>cb_gdb:
> output line
No symbol "line" in current context.
>>>>>>cb_gdb:
> whatis m_TokenIndex
No symbol "m_TokenIndex" in current context.
>>>>>>cb_gdb:
> output m_TokenIndex
No symbol "m_TokenIndex" in current context.
>>>>>>cb_gdb:
> whatis next
No symbol "next" in current context.
>>>>>>cb_gdb:
> output next
No symbol "next" in current context.
>>>>>>cb_gdb:
> whatis res
No symbol "res" in current context.
>>>>>>cb_gdb:
> output res
No symbol "res" in current context.
>>>>>>cb_gdb:
> whatis startAt
No symbol "startAt" in current context.
>>>>>>cb_gdb:
> output startAt
No symbol "startAt" in current context.
>>>>>>cb_gdb:
> bt 30
#0  MainFrame::CreateIDE (this=0x3718af0) at F:\cb_svn\src\src\main.cpp:631
#1  0x0042736d in MainFrame (this=0x3718af0, parent=0x0) at F:\cb_svn\src\src\main.cpp:511
#2  0x004026e3 in CodeBlocksApp::InitFrame (this=0x367bc08) at F:\cb_svn\src\src\app.cpp:401
#3  0x00404c57 in CodeBlocksApp::OnInit (this=0x367bc08) at F:\cb_svn\src\src\app.cpp:625
#4  0x00469b30 in wxAppConsole::CallOnInit (this=0x367bc08) at D:/wxWidgets-2.8.10/include/wx/app.h:76
#5  0x6273bff1 in ?? ()
#6  0x0367bc08 in ?? ()
#7  0x0367b870 in ?? ()
#8  0x40000060 in ?? ()
#9  0x77c2c3ce in ?? ()
#10 0x00460044 in wxWindow::Thaw() ()
#11 0x7ffdfc00 in ?? ()
#12 0x00261f03 in ?? ()
#13 0x0023fe6c in ?? ()
warning: (Internal error: pc 0x261f02 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x261f02 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x261f02 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x261f02 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x261f02 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe6b in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe6b in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe6b in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe6b in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe6b in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fecb in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fecb in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fecb in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fecb in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fecb in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2ffff in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2ffff in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2ffff in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2ffff in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2ffff in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe67 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe67 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe67 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe67 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23fe67 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)
#14 0x00000003 in ?? () at F:\cb_svn\src\src\appglobals.cpp:57
#15 0x627a5977 in ?? ()
#16 0x0023fecc in ?? ()
#17 0x0367b870 in ?? ()
#18 0x0367afb0 in ?? ()
#19 0x00030000 in ?? ()
#20 0x0367afa8 in ?? ()
#21 0x0023fe68 in ?? ()
#22 0x7c96e52f in ?? ()
#23 0x0367b870 in ?? ()
#24 0x0367b870 in ?? ()
#25 0x00000005 in ?? () at d:/mingw/bin/../lib/gcc/mingw32/4.4.0/include/c++/ext/new_allocator.h:73
#26 0x00401d58 in WinMain@16 (hInstance=0x400000, hPrevInstance=0x0, lpCmdLine=0x261f03 "--debug-log --no-check-associations -ns -nd", nCmdShow=10) at F:\cb_svn\src\src\app.cpp:256
#27 0x00465e48 in main ()
>>>>>>cb_gdb:
> whatis MainFrame
Type MainFrame has no component named MainFrame.
>>>>>>cb_gdb:
> output MainFrame
cannot resolve overloaded method `MainFrame': no arguments supplied
>>>>>>cb_gdb:
> output MainFrame
cannot resolve overloaded method `MainFrame': no arguments supplied
>>>>>>cb_gdb:
> output MainFrame
cannot resolve overloaded method `MainFrame': no arguments supplied
>>>>>>cb_gdb:
> break "F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:588"
No source file named F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp.
Breakpoint 3 ("F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:588) pending.
>>>>>>cb_gdb:
> cont

Quite strange, breakpoint on some source file works, but others don't.

Code: [Select]
>>>>>>cb_gdb:
> break "F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:588"
No source file named F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp.
Breakpoint 3 ("F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:588) pending.

It seems there is still some bug in TDM-MinGW 4.4 or GDB.exe7.0   :(
« Last Edit: October 09, 2009, 03:14:04 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline theOcelot

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: [OT] MinGW GDB 7.0 is released
« Reply #23 on: October 09, 2009, 07:30:13 pm »
It's not working for me. I've always had trouble with hitting breakpoints in headers. Here's a few more datapoints to work with:

I'm on Windows Vista, the official MinGW G++ 4.4.0, and CB 8.02. I started a fresh, C++, CB console project, and added the following file, named "tester1.h":
Code: [Select]
#ifndef TESTER1_H
#define TESTER1_H

#include <iostream>

inline void function(){
    std::cout << "in function()" << std::endl;
}

struct Foo{
    Foo(){
        std::cout << "constructing Foo" << std::endl;
    }
    void bar(){
        std::cout << "Foo::bar" << std::endl;
    }
};

#endif

Then in main .cpp:
Code: [Select]
int main()
{
    cout << "Hello world!" << endl;
    Foo foo;
    function();
    foo.bar();
    return 0;
}

I set breakpoints on all the output lines in tester1.h, and on the return 0. Only the latter was hit, with either GDB 6.8 or 7.0. Same results when I named the header tester.h, in case the number in the filename was screwing things up. There path to my project is C:\Users\Fleenor\Projects\DebugTest, no spaces or anything irregular. Mingw is C:\MinGW.

Here is my debug log with GDB 7.0, tester1.h:
Code: [Select]
PATH=.;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin\Python;C:\MinGW\bin;C:\Program Files\Subversion\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin
Command-line: C:\MinGW\bin\gdb.exe -nx -fullname  -quiet -args bin/Debug/DebugTest.exe
Working dir : C:\Users\Fleenor\Projects\DebugTest\
> set prompt >>>>>>cb_gdb:
Reading symbols from C:\Users\Fleenor\Projects\DebugTest/bin/Debug/DebugTest.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:
> directory C:/Users/Fleenor/Projects/DebugTest/
>>>>>>cb_gdb:
> break "C:/Users/Fleenor/Projects/DebugTest/main.cpp:12"
Breakpoint 1 at 0x4013ef: file C:\Users\Fleenor\Projects\DebugTest\main.cpp, line 12.
>>>>>>cb_gdb:
> break "C:/Users/Fleenor/Projects/DebugTest/tester1.h:15"
No source file named C:/Users/Fleenor/Projects/DebugTest/tester1.h.
Breakpoint 2 ("C:/Users/Fleenor/Projects/DebugTest/tester1.h:15) pending.
>>>>>>cb_gdb:
> break "C:/Users/Fleenor/Projects/DebugTest/tester1.h:12"
No source file named C:/Users/Fleenor/Projects/DebugTest/tester1.h.
Breakpoint 3 ("C:/Users/Fleenor/Projects/DebugTest/tester1.h:12) pending.
>>>>>>cb_gdb:
> break "C:/Users/Fleenor/Projects/DebugTest/tester1.h:7"
No source file named C:/Users/Fleenor/Projects/DebugTest/tester1.h.
Breakpoint 4 ("C:/Users/Fleenor/Projects/DebugTest/tester1.h:7) pending.
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
gdb: kernel event for pid=2840 tid=3476 code=CREATE_PROCESS_DEBUG_EVENT)
[New Thread 2840.0xd94]
gdb: kernel event for pid=2840 tid=3476 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\Windows\system32\ntdll.dll" at 0x76e30000.
gdb: kernel event for pid=2840 tid=3476 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\Windows\system32\kernel32.dll" at 0x76bb0000.
gdb: kernel event for pid=2840 tid=3476 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\Windows\system32\msvcrt.dll" at 0x75720000.
gdb: kernel event for pid=2840 tid=3476 code=LOAD_DLL_DEBUG_EVENT)
gdb: Loading dll "C:\MinGW\bin\libgcc_s_dw2-1.dll" at 0x6e940000.
gdb: kernel event for pid=2840 tid=3476 code=EXCEPTION_DEBUG_EVENT)
warning: Can not parse XML library list; XML support was disabled at compile time
gdb: kernel event for pid=2840 tid=3476 code=EXCEPTION_DEBUG_EVENT)
Breakpoint 1, main () at C:\Users\Fleenor\Projects\DebugTest\main.cpp:12
C:\Users\Fleenor\Projects\DebugTest\main.cpp:12:168:beg:0x4013ef
>>>>>>cb_gdb:
> info locals
foo = {<No data fields>}
>>>>>>cb_gdb:
> info args
No arguments.
>>>>>>cb_gdb:
> bt 30
#0  main () at C:\Users\Fleenor\Projects\DebugTest\main.cpp:12
>>>>>>cb_gdb:
> quit
gdb: windows_close, inferior_ptid=2840

The interesting part of course is where it still says "No source file named C:/Users/Fleenor/Projects/DebugTest/tester1.h." I wonder if it could be something to do with the different slash types, but it seems like that would have been fixed a long time ago.

I don't really want to do anything to further confuse my installation, but would TDM help me? Is the only way to know to try? I'll attach my project in 7z format, if anyone wants to see if they can reproduce my behavior, or show non-reproducibility on their system.

[attachment deleted by admin]
« Last Edit: October 09, 2009, 07:34:08 pm by theOcelot »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: [OT] MinGW GDB 7.0 is released
« Reply #24 on: October 09, 2009, 07:54:10 pm »
Can you try a nightly build?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline theOcelot

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: [OT] MinGW GDB 7.0 is released
« Reply #25 on: October 09, 2009, 09:35:49 pm »
Can you try a nightly build?
Who, me? Of CB? Sure, I guess. Do you mean get it from SVN? I can't find a binary download link for the nightlies anymore. I also don't know for sure how the build will work with my wxWidgets.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: [OT] MinGW GDB 7.0 is released
« Reply #26 on: October 09, 2009, 09:43:30 pm »
theOcelot: yes you  :lol:,  binary nightly build (not hyper new, but uber new relative to the 8.02 release) can be found in the nightly subforum on this site  :lol:
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] MinGW GDB 7.0 is released
« Reply #27 on: October 10, 2009, 03:26:03 am »
@theOcelot

I test your code.

Q:Is breakpoint in a header file works?

A: Win XP TDM-MinGW 4.4.1  GDB 6.8.3 works

A: Win XP TDM-MinGW 4.4.1  GDB 7.0    works


By the way:
Does other guys try setting a breakpoint in a C::B's plugin source, like plugins\codecompletion\parser\tokenizer.cpp. It seems the breakpoints don't work there. The problem is quite the same:

Code: [Select]
>>>>>>cb_gdb:
> break "F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:591"
No source file named F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp.
Breakpoint 4 ("F:/cb_svn/src/plugins/codecompletion/parser/tokenizer.cpp:591) pending.



If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline theOcelot

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: [OT] MinGW GDB 7.0 is released
« Reply #28 on: October 10, 2009, 08:32:37 am »
Ha! Victory! I hand-compiled main.cpp into main.o on the command line, using relative paths with forward slashes instead of absolute paths with backslashes, as in Bob Fletcher's bug report. Once CB linked it, it worked, and all three header breakpoints were hit.

The nightly build has the same behavior, passing paths using backslashes, so the problem didn't go away when I switched. Maybe it will let me ctrl-shift-F9 to compile just one file without crashing again, in which case it will have been worth it anyway.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] MinGW GDB 7.0 is released
« Reply #29 on: October 10, 2009, 09:22:41 am »
I think I find the reason why I can't debug C::B under GDB 7.0 (Win XP TDM-MinGW 4.4.1 )

Here is my steps:
1, clear all the breakpoints.
2, I start debugging.
3, the debuggee started
4, but I fond that GDB.exe hungs, because I can't manually send the debug command in the "debug" panel. There's no response after I hit enter button.

 :(

Any ideas?

Edit
I just do another test:

1, clear all the breakpoints.
2, I start debugging.
3, the debuggee started
4, I click on the "stop debugger" button, but it seems the debugger can't be paused.

Here is the log:

Code: [Select]
Debugger name and version: GNU gdb (GDB) 7.0
Trying to pause the running process...

So, I know why I can't set breakpoint when debugging, you can see the code below:

Code: [Select]
bool DebuggerGDB::AddBreakpoint(const wxString& file, int line)
{
    const bool debuggerIsRunning = !IsStopped();
    if (debuggerIsRunning)
    {
        Break();
    }
    m_State.AddBreakpoint(file, line, false);
    if (m_pBreakpointsWindow)
    {
        m_pBreakpointsWindow->Refresh();
    }
    if (debuggerIsRunning)
    {
        Continue();
    }
    return true;
} // end of AddBreakpoint

But it seems the "Break();"  function can not be executed correctly( gdb is still running or gdb hangs ), then certainly I can't set the following breakpoints.


« Last Edit: October 10, 2009, 05:10:35 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.