diff --git a/uppsrc/CodeEditor/CodeEditor.cpp b/uppsrc/CodeEditor/CodeEditor.cpp index acead2b31..cad4b2f27 100644 --- a/uppsrc/CodeEditor/CodeEditor.cpp +++ b/uppsrc/CodeEditor/CodeEditor.cpp @@ -675,14 +675,13 @@ WString CodeEditor::GetI() { int l, h; WString ft; - if(GetSelection(l, h) || GetWordPos(GetCursor(), l, h)) { + if((GetSelection(l, h) || GetWordPos(GetCursor(), l, h)) && h - l < 60) while(l < h) { int c = GetChar(l++); if(c == '\n') break; ft.Cat(c); } - } return ft; } diff --git a/uppsrc/ide/Android.cpp b/uppsrc/ide/Android.cpp index 1e3d0876c..b1661b3c5 100644 --- a/uppsrc/ide/Android.cpp +++ b/uppsrc/ide/Android.cpp @@ -3,7 +3,7 @@ String Ide::GetAndroidSdkPath() { VectorMap bm = GetMethodVars(method); - if(bm.Get("BUILDER") == "ANDROID") + if(bm.Get("BUILDER", "") == "ANDROID") return bm.Get("SDK_PATH"); return String(); } diff --git a/uppsrc/ide/Debuggers/Gdb.cpp b/uppsrc/ide/Debuggers/Gdb.cpp index 6b4adf8cb..2ed094213 100644 --- a/uppsrc/ide/Debuggers/Gdb.cpp +++ b/uppsrc/ide/Debuggers/Gdb.cpp @@ -226,6 +226,8 @@ String Gdb::Cmdp(const char *cmdline, bool fr) } if(active_thread >= 0) threads <<= active_thread; + if(threads.GetCount() == 0) + Stop(); Data(); return s; } @@ -355,6 +357,10 @@ bool Gdb::Create(One rval_ _host, const String& exefile, const String& cmd Cmd("set width 0"); Cmd("set confirm off"); Cmd("set print asm-demangle"); + Cmd("set print static-members off"); + Cmd("set print vtbl off"); + Cmd("set print repeat 0"); + Cmd("set print null-stop"); if(!IsNull(cmdline)) Cmd("set args " + cmdline); diff --git a/uppsrc/ide/Debuggers/GdbCmd.cpp b/uppsrc/ide/Debuggers/GdbCmd.cpp index 52ec3ff55..c78e93690 100644 --- a/uppsrc/ide/Debuggers/GdbCmd.cpp +++ b/uppsrc/ide/Debuggers/GdbCmd.cpp @@ -111,7 +111,7 @@ String Gdb::Cmd(const char *command) #endif Lock(); if(command) { - LLOG("Cmd: " << command); + LLOG("========= Cmd: " << command); dbg->Write(String(command) + "\n"); PutVerbose(command); } @@ -125,6 +125,7 @@ String Gdb::Cmd(const char *command) break; } if(!s.IsEmpty() && Result(result, s)) { + LLOG(result); PutVerbose(result); break; } @@ -132,7 +133,7 @@ String Gdb::Cmd(const char *command) ProcessEvents(); ms0 = msecs(); } - if(s.GetCount() == 0) +// if(s.GetCount() == 0) GuiSleep(0); if(TTYQuit()) Stop(); diff --git a/uppsrc/ide/Debuggers/GdbData.cpp b/uppsrc/ide/Debuggers/GdbData.cpp index 81ca3231d..9bfc5722e 100644 --- a/uppsrc/ide/Debuggers/GdbData.cpp +++ b/uppsrc/ide/Debuggers/GdbData.cpp @@ -137,10 +137,11 @@ void Gdb::Watches() void Gdb::TryAuto(Index& tested, const String& exp) { - if(tested.Find(exp) < 0) { + if(tested.Find(exp) < 0 && findarg(exp, "true", "false") < 0) { tested.Add(exp); String val = Print(exp); - if(!IsNull(val) && !val.EndsWith(")}") && !IsAlpha(*val)) + if(!IsNull(val) && !val.EndsWith(")}") && !val.EndsWith(")>") && + (!IsAlpha(*val) || findarg(val, "true", "false") >= 0)) autos.Add(exp, val); } } @@ -149,10 +150,10 @@ void Gdb::Autos() { VectorMap prev = DataMap(autos); autos.Clear(); - CParser p(autoline); Index tested; try { - while(!p.IsEof()) { + CParser p(autoline); + while(!p.IsEof()) if(p.IsId()) { String exp = p.ReadId(); TryAuto(tested, exp); @@ -168,8 +169,8 @@ void Gdb::Autos() TryAuto(tested, exp); } } - p.SkipTerm(); - } + else + p.SkipTerm(); } catch(CParser::Error) {} autos.Sort(); @@ -240,8 +241,6 @@ void Gdb::Cpu() String s = FastCmd("info registers"); StringStream ss(s); cpu.Clear(); -// for(int i = 0; i < reglbl.GetCount(); i++) -// reglbl[i]->SetInk(SColorText); bool even = false; while(!ss.IsEof()) { String ln = ss.GetLine(); diff --git a/uppsrc/ide/InstantSetup.cpp b/uppsrc/ide/InstantSetup.cpp index a1e93b093..abc7ebe74 100644 --- a/uppsrc/ide/InstantSetup.cpp +++ b/uppsrc/ide/InstantSetup.cpp @@ -259,7 +259,7 @@ void InstantSetup() bmSet(bm, "DEBUG_INFO", "2"); bmSet(bm, "DEBUG_BLITZ", "1"); bmSet(bm, "DEBUG_LINKMODE", "0"); - bmSet(bm, "DEBUG_OPTIONS", "-O0 -gstabs"); + bmSet(bm, "DEBUG_OPTIONS", "-O0 -ggdb"); bmSet(bm, "DEBUG_FLAGS", ""); bmSet(bm, "DEBUG_LINK", ""); bmSet(bm, "RELEASE_BLITZ", "1");