diff --git a/uppsrc/CtrlCore/CocoTop.h b/uppsrc/CtrlCore/CocoTop.h index ab7d01ad5..18bce5daf 100644 --- a/uppsrc/CtrlCore/CocoTop.h +++ b/uppsrc/CtrlCore/CocoTop.h @@ -18,4 +18,4 @@ public: virtual bool HotKey(dword key); void SetMainMenu(Event menu); - //$ }; \ No newline at end of file +//$ }; \ No newline at end of file diff --git a/uppsrc/CtrlCore/cocotodo.txt b/uppsrc/CtrlCore/cocotodo.txt index c11dd4a56..8c181d7d7 100644 --- a/uppsrc/CtrlCore/cocotodo.txt +++ b/uppsrc/CtrlCore/cocotodo.txt @@ -1,10 +1,10 @@ +brew install gdb + + sooner: - Warning: Terminal '/usr/bin/xterm' not found, executing in background. - -- drk tyheme - - .iml D&D does not work - Topic++, menu at topics, New topic has wrong hotkey @@ -21,7 +21,6 @@ sooner: - download .scd files (or put to bundle) - * apple debugger later: @@ -74,6 +73,8 @@ later: done: +- drk tyheme + - Delete CocoDnD.cpp -> crash - tooltip in package organizer is too small diff --git a/uppsrc/CtrlLib/ChCoco.cpp b/uppsrc/CtrlLib/ChCoco.cpp index af0f20652..40f4c2927 100644 --- a/uppsrc/CtrlLib/ChCoco.cpp +++ b/uppsrc/CtrlLib/ChCoco.cpp @@ -100,7 +100,7 @@ void CocoButton(Button::Style& s, int type, int value) Image gg = CreateImage(h[i].GetSize(), SColorFace()); Over(gg, h[i]); s.monocolor[i] = s.textcolor[i] = i == CTRL_DISABLED ? SColorDisabled() - : Grayscale(AvgColor(gg, h[i].GetSize().cy / 3)) > 160 ? SColorText() + : Grayscale(AvgColor(gg, h[i].GetSize().cy / 3)) > 160 ? Black() : White(); } s.overpaint = 5; diff --git a/uppsrc/CtrlLib/ChCocoMM.mm b/uppsrc/CtrlLib/ChCocoMM.mm index 4b009e549..2cfe012aa 100644 --- a/uppsrc/CtrlLib/ChCocoMM.mm +++ b/uppsrc/CtrlLib/ChCocoMM.mm @@ -101,7 +101,7 @@ void Coco_ThemePaint(void *cgcontext, const Upp::Rect& r, int type, int value, i memset(&bdi, 0, sizeof(bdi)); bdi.value = Upp::decode(value, 0, kThemeButtonOff, 1, kThemeButtonOn, kThemeButtonMixed); bdi.state = st; - bdi.kind = Upp::decode(type, COCO_CHECKBOX, (int)kThemeCheckBox, + bdi.kind = Upp::decode(type, COCO_CHECKBOX, (int)kThemeSmallCheckBox, COCO_RADIOBUTTON, (int)kThemeSmallRadioButton, COCO_BEVELBUTTON, (int)kThemeBevelButtonMedium, COCO_ROUNDEDBUTTON, (int)kThemeRoundedBevelButton, diff --git a/uppsrc/ide/Debuggers/Gdb.cpp b/uppsrc/ide/Debuggers/Gdb.cpp index 9aed1aad7..87050ea0f 100644 --- a/uppsrc/ide/Debuggers/Gdb.cpp +++ b/uppsrc/ide/Debuggers/Gdb.cpp @@ -124,11 +124,7 @@ int CharFilterReSlash(int c) String Bpoint(Host& host, const String& file, int line) { -#ifdef PLATFORM_COCOA - return String() << " -l " << line + " -f " << Filter(host.GetHostPath(NormalizePath(file)), CharFilterReSlash); -#else return String().Cat() << Filter(host.GetHostPath(NormalizePath(file)), CharFilterReSlash) << ":" << line + 1; -#endif } bool Gdb::TryBreak(const char *text) @@ -149,21 +145,12 @@ bool Gdb::SetBreakpoint(const String& filename, int line, const String& bp) String bi = Bpoint(*host, filename, line); String command; -#ifdef PLATFORM_COCOA - if(bp.IsEmpty()) - command = "breakpoint clear " + bi; - else if(bp[0]==0xe || bp == "1") - command = "breakpoint set " + bi; - else - command = "breakpoint set " + bi + " if " + bp; -#else if(bp.IsEmpty()) command = "clear " + bi; else if(bp[0]==0xe || bp == "1") command = "b " + bi; else command = "b " + bi + " if " + bp; -#endif return !FastCmd(command).IsEmpty(); } @@ -548,9 +535,6 @@ bool Gdb::Create(One&& _host, const String& exefile, const String& cmdline watches.WhenAcceptEdit = THISBACK(ObtainData); tab <<= THISBACK(ObtainData); -#ifdef PLATFORM_COCOA - Cmd("settings set prompt " GDB_PROMPT); -#else Cmd("set prompt " GDB_PROMPT); Cmd("set disassembly-flavor intel"); Cmd("set exec-done-display off"); @@ -563,7 +547,6 @@ bool Gdb::Create(One&& _host, const String& exefile, const String& cmdline Cmd("set print vtbl off"); Cmd("set print repeat 0"); Cmd("set print null-stop"); -#endif #ifdef PLATFORM_WIN32 Cmd("set new-console on"); diff --git a/uppsrc/ide/Debuggers/Gdb.h b/uppsrc/ide/Debuggers/Gdb.h index cbb7b88d3..023d85842 100644 --- a/uppsrc/ide/Debuggers/Gdb.h +++ b/uppsrc/ide/Debuggers/Gdb.h @@ -27,7 +27,7 @@ public: void Lock(); void Unlock(); - String Cmd(const char *command); + String Cmd(const char *command, bool start = false); String FastCmd(const char *command); bool IsProcessExitedNormally(const String& cmd_output) const; diff --git a/uppsrc/ide/Debuggers/GdbCmd.cpp b/uppsrc/ide/Debuggers/GdbCmd.cpp index de146b757..e6d52f426 100644 --- a/uppsrc/ide/Debuggers/GdbCmd.cpp +++ b/uppsrc/ide/Debuggers/GdbCmd.cpp @@ -103,7 +103,7 @@ bool Gdb::Result(String& result, const String& s) return false; } -String Gdb::Cmd(const char *command) +String Gdb::Cmd(const char *command, bool start) { if(!dbg || !dbg->IsRunning() || IdeIsDebugLock()) return Null; #ifdef _DEBUG @@ -125,10 +125,16 @@ String Gdb::Cmd(const char *command) LLOG("Running: " << dbg->IsRunning()); break; } + if(s.GetCount()) DDUMP(s); if(!s.IsEmpty() && Result(result, s)) { LLOG(result); PutVerbose(result); - break; + if(start) { + start = false; + result = s.Mid(result.GetCount()); + } + else + break; } if(ms0 != msecs()) { ProcessEvents(); @@ -144,7 +150,9 @@ String Gdb::Cmd(const char *command) if(command) { PutVerbose(String() << "Time of `" << command <<"` " << ts); } - PutVerbose("Result: " + result); + PutVerbose("=========== Result:"); + PutVerbose(result); + PutVerbose("==================="); return result; } diff --git a/uppsrc/ide/Debuggers/Terminal.cpp b/uppsrc/ide/Debuggers/Terminal.cpp index 988e0cd85..eb094ffed 100644 --- a/uppsrc/ide/Debuggers/Terminal.cpp +++ b/uppsrc/ide/Debuggers/Terminal.cpp @@ -87,16 +87,16 @@ bool TTYQuit() { return false; } String GdbCommand(bool console) { #ifdef PLATFORM_COCOA - String gdb = "lldb "; + String gdb = "/usr/local/bin/gdb "; #else String gdb = "gdb "; -#endif #ifdef PLATFORM_POSIX if(console) { String tty = CreateDebugTTY(); if(tty.GetCount()) gdb << "-tty=" << tty << ' '; } +#endif #endif return gdb; }