diff --git a/uppsrc/Core/Defs.h b/uppsrc/Core/Defs.h index 37f9d8581..1f3108d25 100644 --- a/uppsrc/Core/Defs.h +++ b/uppsrc/Core/Defs.h @@ -467,7 +467,7 @@ extern const Nuller Null; template void SetNull(T& x) { x = Null; } -template bool IsNull(const T& x) { return x.IsNullInstance(); } +template bool IsNull(const T& x) { return x.IsNullInstance(); } template<> inline bool IsNull(const int& i) { return i == INT_NULL; } template<> inline bool IsNull(const int64& i) { return i == INT64_NULL; } diff --git a/uppsrc/ide/Debuggers/Data.cpp b/uppsrc/ide/Debuggers/Data.cpp index 8fa4c25bb..93d899dda 100644 --- a/uppsrc/ide/Debuggers/Data.cpp +++ b/uppsrc/ide/Debuggers/Data.cpp @@ -118,6 +118,7 @@ void Pdb::Autos() { VectorMap prev = DataMap(autos); autos.Clear(); + autotext.Replace("//", ""); CParser p(autotext); TryAuto("this", prev); while(!p.IsEof()) @@ -295,6 +296,7 @@ bool Pdb::Tip(const String& exp, CodeEditor::MouseTip& mt) void Pdb::Data() { +DLOG("Data"); switch(tab.Get()) { case TAB_AUTOS: Autos(); break; case TAB_LOCALS: Locals(); break; diff --git a/uppsrc/ide/Debuggers/Pdb.cpp b/uppsrc/ide/Debuggers/Pdb.cpp index 18f37daa9..6b7863a1e 100644 --- a/uppsrc/ide/Debuggers/Pdb.cpp +++ b/uppsrc/ide/Debuggers/Pdb.cpp @@ -233,6 +233,8 @@ Pdb::Pdb() autos.WhenBar = THISBACK(AutosMenu); autos.WhenLeftDouble = THISBACK1(ExploreKey, &autos); +DLOG("TEST"); + int c = EditField::GetStdHeight(); explorer.AddColumn("", 1); explorer.AddColumn("", 6).SetDisplay(Single()); diff --git a/uppsrc/ide/Debuggers/Pdb.h b/uppsrc/ide/Debuggers/Pdb.h index 0567ba05d..501f9d464 100644 --- a/uppsrc/ide/Debuggers/Pdb.h +++ b/uppsrc/ide/Debuggers/Pdb.h @@ -327,6 +327,7 @@ struct Pdb : Debugger, ParentCtrl { Val Comparison(CParser& p); Val Exp0(CParser& p); Val Exp(CParser& p); + void CatInt(Visual& result, int64 val); void Visualise(Visual& result, Pdb::Val val, int expandptr, int slen); void Visualise(Visual& result, Pdb::Val val, int expandptr); Visual Visualise(Val v); diff --git a/uppsrc/ide/Debuggers/Visualise.cpp b/uppsrc/ide/Debuggers/Visualise.cpp index 4aa00b16a..8769b716d 100644 --- a/uppsrc/ide/Debuggers/Visualise.cpp +++ b/uppsrc/ide/Debuggers/Visualise.cpp @@ -48,6 +48,11 @@ bool IsOk(const String& q) return true; } +void Pdb::CatInt(Visual& result, int64 val) +{ + result.Cat(IntFormat(val), Red); +} + void Pdb::Visualise(Visual& result, Pdb::Val val, int expandptr, int slen) { const int maxlen = 300; @@ -79,7 +84,8 @@ void Pdb::Visualise(Visual& result, Pdb::Val val, int expandptr, int slen) return; } if(val.type < 0) { - #define RESULTINT(x, type) case x: result.Cat(IntFormat((type)val.ival), Red); break; + #define RESULTINT(x, type) case x: CatInt(result, (type)val.ival); break; + #define RESULTINTN(x, type, t2) case x: if(IsNull((t2)val.ival)) result.Cat("Null ", Magenta); CatInt(result, (type)val.ival); break; switch(val.type) { RESULTINT(BOOL1, bool) RESULTINT(UINT1, byte) @@ -87,12 +93,16 @@ void Pdb::Visualise(Visual& result, Pdb::Val val, int expandptr, int slen) RESULTINT(UINT2, uint16) RESULTINT(SINT2, int16) RESULTINT(UINT4, uint32) - RESULTINT(SINT4, int32) RESULTINT(UINT8, uint64) - RESULTINT(SINT8, int64) + RESULTINTN(SINT4, int32, int) + RESULTINTN(SINT8, int64, int64) case DBL: case FLT: - result.Cat(FormatDouble(val.fval, 20), Red); break; + if(IsNull(val.fval)) + result.Cat("Null", Magenta); + else + result.Cat(FormatDouble(val.fval, 20), Red); + break; case PFUNC: { result.Cat(Hex(val.address), Red); FnInfo fi = GetFnInfo(val.address);