diff --git a/uppsrc/ide/Debuggers/Code.cpp b/uppsrc/ide/Debuggers/Code.cpp index c654e82e6..e6ef097b5 100644 --- a/uppsrc/ide/Debuggers/Code.cpp +++ b/uppsrc/ide/Debuggers/Code.cpp @@ -73,7 +73,9 @@ void Pdb::Sync() for(int i = 0; i < reg.GetCount(); i++) { const CpuRegister& r = reg[i]; if(r.name) - cpu.Add(String().Cat() << r.name << "|0x" << Hex(GetCpuRegister(ctx, r.sym))); + cpu.Add(String().Cat() << " " << r.name << "|" + << Hex(GetCpuRegister(ctx, r.sym)) << "|" + << int(i & 1)); } SetFrame(); IdeActivateBottom(); diff --git a/uppsrc/ide/Debuggers/Pdb.cpp b/uppsrc/ide/Debuggers/Pdb.cpp index 8a687b2dc..58735b47c 100644 --- a/uppsrc/ide/Debuggers/Pdb.cpp +++ b/uppsrc/ide/Debuggers/Pdb.cpp @@ -172,16 +172,23 @@ void Pdb::SerializeSession(Stream& s) struct CpuRegisterDisplay : Display { virtual void Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const { - w.DrawRect(r, paper); - static int cx1 = GetTextSize("EFLAGS12", StdFont().Bold()).cx + - GetTextSize("0x0000000000000000", StdFont()).cx; + Font fnt = Courier(Ctrl::HorzLayoutZoom(12)); + static int cx1 = GetTextSize("EFLAGS12", fnt().Bold()).cx + + GetTextSize("0000 0000 0000 0000", fnt).cx; String name; String value; - SplitTo((String)q, '|', name, value); - Size tsz = GetTextSize(value, StdFont()); + String odd; + SplitTo((String)q, '|', name, value, odd); + w.DrawRect(r, odd != "1" || (style & CURSOR) ? paper : Blend(SColorMark, SColorPaper, 220)); + int i = value.GetLength() - 4; + while(i > 0) { + value.Insert(i, ' '); + i -= 4; + } + Size tsz = GetTextSize(value, fnt); int tt = r.top + max((r.Height() - tsz.cy) / 2, 0); - w.DrawText(r.left, tt, name, StdFont().Bold(), ink); - w.DrawText(r.left + cx1 - tsz.cx, tt, value, StdFont(), ink); + w.DrawText(r.left, tt, name, fnt().Bold(), ink); + w.DrawText(r.left + cx1 - tsz.cx, tt, value, fnt, ink); } }; @@ -247,6 +254,7 @@ Pdb::Pdb() tab.Add(memory.SizePos(), "Memory"); cpu.Columns(4); + cpu.ItemHeight(Courier(Ctrl::HorzLayoutZoom(12)).GetCy()); cpu.SetDisplay(Single()); memory.cdb = this; diff --git a/uppsrc/ide/Debuggers/Pdb.h b/uppsrc/ide/Debuggers/Pdb.h index dffe76a42..1d222f4d0 100644 --- a/uppsrc/ide/Debuggers/Pdb.h +++ b/uppsrc/ide/Debuggers/Pdb.h @@ -293,7 +293,6 @@ struct Pdb : Debugger, ParentCtrl { dword GetSymInfo(adr_t modbase, dword typeindex, IMAGEHLP_SYMBOL_TYPE_INFO info); const Type& GetType(int ti); int GetTypeIndex(adr_t modbase, dword typeindex); - const Type& GetTypeId(adr_t modbase, dword typeindex) { return GetType(GetTypeIndex(modbase, typeindex)); } Val GetGlobal(const String& name); adr_t GetAddress(FilePos p); diff --git a/uppsrc/ide/Debuggers/Sym.cpp b/uppsrc/ide/Debuggers/Sym.cpp index 13fc5a37e..0f440adf7 100644 --- a/uppsrc/ide/Debuggers/Sym.cpp +++ b/uppsrc/ide/Debuggers/Sym.cpp @@ -131,7 +131,6 @@ void Pdb::TypeVal(Pdb::Val& v, int typeId, adr_t modbase) tag = GetSymInfo(modbase, typeId, TI_GET_SYMTAG); if(tag == SymTagPointerType) { v.ref++; - const Type& tptr = GetTypeId(modbase, typeId); // What is this? } else if(tag == SymTagArrayType)