mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-02 16:22:40 -06:00
ide: gdb issues
git-svn-id: svn://ultimatepp.org/upp/trunk@9089 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d5f7082d16
commit
6bcade83e3
6 changed files with 19 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
String Ide::GetAndroidSdkPath()
|
||||
{
|
||||
VectorMap<String, String> bm = GetMethodVars(method);
|
||||
if(bm.Get("BUILDER") == "ANDROID")
|
||||
if(bm.Get("BUILDER", "") == "ANDROID")
|
||||
return bm.Get("SDK_PATH");
|
||||
return String();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<Host> 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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -137,10 +137,11 @@ void Gdb::Watches()
|
|||
|
||||
void Gdb::TryAuto(Index<String>& 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<String, String> prev = DataMap(autos);
|
||||
autos.Clear();
|
||||
CParser p(autoline);
|
||||
Index<String> 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();
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue