User forums > Nightly builds
The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
ollydbg:
Ok, I just find that I may find the reason of this issue:
GDB will return a ">>>>>>cb_gdb:" (we call it FULL_GDB_PROMPT or GDB_PROMPT string, this is the customized gdb prompt by codeblocks) to indicate the previous command is executed correctly.
But it looks like every gdb command should return a GDB_PROMPT.
But when I have many custom script in the debugger setting dialog, such as: I put three command here.
--- Code: ---source $(TARGET_COMPILER_DIR)bin\stl.gdb
source $(TARGET_COMPILER_DIR)bin\wx.gdb
set print elements 200
--- End code ---
Those three command will return three GDB_PROMPT.
Also, the command like setting the directory command will also return a GDB_PROMPT.
After that, we are sending setting break point command, then wait to receive the bp index from gdb. This is a handshake, gdb will return the correct bp index.
Now, if we do not eat/clear the previous GDB_PROMPT, they will be buffered, and serves as the response string from gdb, so we get a bp index mismatch.
So, the solution should be simple:
We should clear/wait the GDB_PROMPT after the custom gdb command, this will not later confuse the normal breakpoint command handshake.
MortenMacFly:
--- Quote from: ollydbg on January 31, 2012, 04:07:41 am ---Can you see the difference? when you delete the same line, the debugger plugin send different index command.
--- End quote ---
Mmmhh... that is weird, indeed. Looks like the output parsing queue is somehow corrupted, too. There should not be two ">>>>>>cb_gdb:" in one line...?! Is the GBD 7.4 debugger threaded?! Is the MinGW official the TDM-GCC one?
ollydbg:
--- Quote from: MortenMacFly on January 31, 2012, 07:24:07 am ---
--- Quote from: ollydbg on January 31, 2012, 04:07:41 am ---Can you see the difference? when you delete the same line, the debugger plugin send different index command.
--- End quote ---
Mmmhh... that is weird, indeed. Looks like the output parsing queue is somehow corrupted, too. There should not be two ">>>>>>cb_gdb:" in one line...?!
--- End quote ---
Yes, I have debugged some hours, and find the reason in my previous posts.
--- Quote ---Is the GBD 7.4 debugger threaded?! Is the MinGW official the TDM-GCC one?
--- End quote ---
Threat? dangerous? No, both should works quite well.
The gdb 7.4 was branched from the main trunk cvs about one or two months ago, and there are not many bug fixes targets to MinGW.
But the gdb cvs recently has many things changed targets to mingw, at least the "relocated feature", maybe other things. (you may see some discussions in gdb patches mail lists)
So, currently, I'm still use gdb cvs build myself. :)
MortenMacFly:
--- Quote from: ollydbg on January 31, 2012, 07:32:38 am ---Threat? dangerous? No, both should works quite well.
--- End quote ---
LOL, no - I meant it may use threads to speed up things and then the output can come mixed. But this really should not be the case.
--- Quote from: ollydbg on January 31, 2012, 07:22:02 am ---We should clear/wait the GDB_PROMPT after the custom gdb command, this will not later confuse the normal breakpoint command handshake.
--- End quote ---
Still weird that this does not happen with earlier versions of GDB.
ollydbg:
--- Quote from: MortenMacFly on January 31, 2012, 07:38:47 am ---
--- Quote from: ollydbg on January 31, 2012, 07:32:38 am ---Threat? dangerous? No, both should works quite well.
--- End quote ---
LOL, no - I meant it may use threads to speed up things and then the output can come mixed. But this really should not be the case.
--- End quote ---
I do not know whether gdb internally handle command by thread or not.
--- Quote ---
--- Quote from: ollydbg on January 31, 2012, 07:22:02 am ---We should clear/wait the GDB_PROMPT after the custom gdb command, this will not later confuse the normal breakpoint command handshake.
--- End quote ---
Still weird that this does not happen with earlier versions of GDB.
--- End quote ---
That's because the later gdb, namely the gdb cvs I tested runs faster.
I have a compare test case:
1, the same test project
2, the same setting breakpoint before debugger started.
3, the same gdb cvs version and same gdb custom command.
The only difference is:
CaseA: I have a debug log code in the line 837 of gdb_dirver.cpp: (which log out a full send command and received text)
--- Code: ---DebugLog(wxString::Format(_T("###Handshake: %s #### %s #####"), cmd->m_Cmd.c_str(), buffer.c_str()));
--- End code ---
CaseB: I just comment out the above debug log code.
The result is:
CaseA works Ok, no bp index mismatch.
CaseB works badly.
So, you see, The DebugLog code generally does not cause anything, but only a time delay, but this hide the issue.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version