You will get the call stack when you enter some chars in the middle of a word.
> bt 30
#0 NativeParser::AI (this=0x3bf6040, result=std::set with 0 elements, searchData=0x22ed28, lineText="", isPrefix=true, caseSensitive=false, search_scope=0x22ecb8, caretPos=-1) at e:\code\cb\cb_trunk\src\plugins\codecompletion\nativeparser.cpp:2338
#1 0x65ec4ae1 in NativeParser::MarkItemsByAI (this=0x3bf6040, searchData=0x22ed28, result=std::set with 0 elements, reallyUseAI=true, isPrefix=true, caseSensitive=false, caretPos=-1) at e:\code\cb\cb_trunk\src\plugins\codecompletion\nativeparser.cpp:1745
#2 0x65ec47f9 in NativeParser::MarkItemsByAI (this=0x3bf6040, result=std::set with 0 elements, reallyUseAI=true, isPrefix=true, caseSensitive=false, caretPos=-1) at e:\code\cb\cb_trunk\src\plugins\codecompletion\nativeparser.cpp:1690
#3 0x65ea7554 in CodeCompletion::CodeComplete (this=0x3bf5ff8) at e:\code\cb\cb_trunk\src\plugins\codecompletion\codecompletion.cpp:1042
#4 0x65eac167 in CodeCompletion::DoCodeComplete (this=0x3bf5ff8) at e:\code\cb\cb_trunk\src\plugins\codecompletion\codecompletion.cpp:1776
#5 0x65eb2935 in CodeCompletion::EditorEventHook (this=0x3bf5ff8, editor=0x5685008, event=...) at e:\code\cb\cb_trunk\src\plugins\codecompletion\codecompletion.cpp:3346
#6 0x65f0958d in EditorHooks::HookFunctor<CodeCompletion>::Call (this=0x2f2e480, editor=0x5685008, event=...) at e:\code\cb\cb_trunk\src\include\editor_hooks.h:54
#7 0x00a943d1 in EditorHooks::CallHooks (editor=0x5685008, event=...) at e:\code\cb\cb_trunk\src\sdk\editor_hooks.cpp:60
#8 0x00a5a353 in cbEditor::OnScintillaEvent (this=0x5685008, event=...) at e:\code\cb\cb_trunk\src\sdk\cbeditor.cpp:3554
#9 0x00a59a67 in cbEditor::OnEditorCharAdded (this=0x5685008, event=...) at e:\code\cb\cb_trunk\src\sdk\cbeditor.cpp:3362
#10 0x627720b6 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#11 0x62772520 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#12 0x627725d3 in wxEvtHandler::ProcessEvent(wxEvent&) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#13 0x6285b59d in wxWindowBase::TryParent(wxEvent&) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#14 0x00b72642 in wxScintilla::NotifyParent (this=0x56af358, _scn=0x22f31c) at e:\code\cb\cb_trunk\src\sdk\wxscintilla\src\wxscintilla.cpp:5084
#15 0x00b752dc in ScintillaWX::NotifyParent (this=0x56ae008, scn=...) at e:\code\cb\cb_trunk\src\sdk\wxscintilla\src\ScintillaWX.cpp:521
#16 0x00bf287c in Editor::NotifyChar (this=0x56ae008, ch=67) at e:\code\cb\cb_trunk\src\sdk\wxscintilla\src\scintilla\src\Editor.cxx:4377
#17 0x00bf0cc8 in Editor::AddCharUTF (this=0x56ae008, s=0x55ca288 "C", len=1, treatAsDBCS=false) at e:\code\cb\cb_trunk\src\sdk\wxscintilla\src\scintilla\src\Editor.cxx:4081
#18 0x00c05a49 in ScintillaBase::AddCharUTF (this=0x56ae008, s=0x55ca288 "C", len=1, treatAsDBCS=false) at e:\code\cb\cb_trunk\src\sdk\wxscintilla\src\scintilla\src\ScintillaBase.cxx:76
#19 0x00b76da3 in ScintillaWX::DoAddChar (this=0x56ae008, key=67) at e:\code\cb\cb_trunk\src\sdk\wxscintilla\src\ScintillaWX.cpp:1067
#20 0x00b71b67 in wxScintilla::OnChar (this=0x56af358, evt=...) at e:\code\cb\cb_trunk\src\sdk\wxscintilla\src\wxscintilla.cpp:4811
#21 0x627720b6 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#22 0x6277222a in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#23 0x627725f6 in wxEvtHandler::ProcessEvent(wxEvent&) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#24 0x627b2c93 in wxWindow::HandleChar(unsigned int, long, bool) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#25 0x627b471a in wxWindow::MSWWindowProc(unsigned int, unsigned int, long) () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#26 0x627af438 in wxWndProc () from E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28u_gcc_custom.dll
#27 0x7e418734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
#28 0x000503b6 in ?? ()
warning: (Internal error: pc 0x101 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x101 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x101 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x101 in read in psymtab, but not in symtab.)
#29 0x00000102 in ?? ()
>>>>>>cb_gdb:
int pos = caretPos == -1 ? searchData->control->GetCurrentPos() : caretPos;
if (pos < 0 || pos > searchData->control->GetLength())
return 0;
m_EditorStartWord = searchData->control->WordStartPosition(pos, true);
m_EditorEndWord = pos; //editor->GetControl()->WordEndPosition(pos, true);
int line = searchData->control->LineFromPosition(pos);
// Get the actual search text, such as "objA.m_aaa.m_bbb"
wxString actual_search(lineText);
if (actual_search.IsEmpty())
{
// Get the position at the start of current line
const int startPos = searchData->control->PositionFromLine(line);
actual_search = searchData->control->GetTextRange(startPos, pos).Trim();
}
Note, the actual_search is the current line Text you might interests.
PS: I'm debugging the c::b's trunk code.