log->Printf("[Debugger::FormatPrompt] ALL RIGHT: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
+ target = target->GetQualifiedRepresentationIfAvailable(target->GetDynamicValueType(), true).get();
}
}
else
# check that an aptly defined synthetic provider does not affect one-lining
self.expect("expression struct S { myInt theInt{12}; }; S()", substrs = ['(theInt = 12)'])
+
+ # check that we can use a synthetic value in a summary
+ self.runCmd("type summary add hasAnInt -s ${var.theInt}")
+ hi = self.frame().FindVariable("hi")
+ self.assertEqual(hi.GetSummary(), "42")
if __name__ == '__main__':
import atexit
int val() { return theValue; }
};
+class hasAnInt {
+ public:
+ myInt theInt;
+ hasAnInt() : theInt(42) {}
+};
+
myInt operator + (myInt x, myInt y) { return myInt(x.val() + y.val()); }
int main() {
myInt x{3};
myInt y{4};
myInt z {x+y};
+ hasAnInt hi;
return z.val(); // break here
}