Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Suggest on the debugger plugin
ollydbg:
I have several problem when debugging debugger plugin.
1, it seems I can't set breakpoint.
See the log:
--- Quote ---> break "E:/code/cb/cc_branch/src/plugins/debuggergdb/disassemblydlg.cpp:139"
No source file named E:/code/cb/cc_branch/src/plugins/debuggergdb/disassemblydlg.cpp.
Breakpoint 6 ("E:/code/cb/cc_branch/src/plugins/debuggergdb/disassemblydlg.cpp:139) pending.
>>>>>>cb_gdb:
> break "E:/code/cb/cc_branch/src/plugins/debuggergdb/debuggergdb.cpp:2852"
Breakpoint 7 at 0x6d895b46: file E:\code\cb\cc_branch\src\plugins\debuggergdb\debuggergdb.cpp, line 2852.
>>>>>>cb_gdb:
--- End quote ---
The line 139 in disassemblydlg.cpp is in the function body of:
--- Code: ---void DisassemblyDlg::SetActiveAddress(unsigned long int addr)
{
if (m_HasActiveAddr && addr == m_LastActiveAddr)
return;
m_HasActiveAddr = false;
m_LastActiveAddr = addr;
for (int i = 0; i < m_pCode->GetLineCount(); ++i)
{
wxString str = m_pCode->GetLine(i).AfterFirst(_T('x')).BeforeFirst(_T('\t'));
unsigned long int lineaddr;
if (str.ToULong(&lineaddr, 16) && lineaddr >= addr) ////////////////////// this is line 139
{
m_pCode->MarkerDeleteAll(DEBUG_MARKER);
m_pCode->MarkerAdd(i, DEBUG_MARKER);
m_pCode->GotoLine(i);
m_pCode->EnsureVisible(i);
m_HasActiveAddr = true;
break;
}
}
}
--- End code ---
But it seems I can set a breakpoint in debuggergdb.cpp.
The other problem is: call stack information is not shown correctly.
see the image:
The third issue is: it seems I can't view the value in this function:
--- Code: ---wxString str = m_pCode->GetLine(i).AfterFirst(_T('x')).BeforeFirst(_T('\t'));
--- End code ---
Here is the debugger log:
--- Quote ---> p str
$2 = UnicodeEncodeError: 'gbk' codec can't encode character u'\ufeee' in position 0: illegal multibyte sequence
>>>>>>cb_gdb:
--- End quote ---
So, I still suspect that there are "two debug entries" for the autovariable "str", so gdb get confused.
BTW: I'm using TDM4.5 at home, with gdb cvs 0708.
It seems I need to use an old compiler like: gcc 4.4.1 or gcc 4.4.3??
oBFusCATed:
ollydbg: do you still experience this problem?
ollydbg:
--- Quote from: oBFusCATed on September 14, 2010, 09:32:19 pm ---ollydbg: do you still experience this problem?
--- End quote ---
Ok, I will try it if I have time, which version should I test? the latest debugger_branch?
(currently, I'm mostly focus on cc_branch, and there are still crash problem on cc_branch :(), but the crash seldomly happened).
oBFusCATed:
I'm talking about the disassembly problem...
ollydbg:
--- Quote from: oBFusCATed on September 15, 2010, 08:43:09 am ---I'm talking about the disassembly problem...
--- End quote ---
OK, I just test the latest debugger_branch, and the dis-assembly problem still exist. There is no arrow in the dis-assembly window.
I use TDM 4.5.1 and unofficial GDB 7.2 released myself.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version