granata.enrico added inline comments.

================
Comment at: tools/lldb-mi/MICmnLLDBDebugger.cpp:835
@@ +834,3 @@
+
+    if (!MI_add_summary(miCategory, "char", MI_char_summary_provider,
+                        lldb::eTypeOptionHideValue | 
lldb::eTypeOptionSkipPointers))
----------------
evgeny777 wrote:
> granata.enrico wrote:
> > Should you also cover "signed char" and "unsigned char" here?
> Hmm. I thought that if regex is false, exact match will be done, won't it? If 
> yes than simple char type should be signed, right?
I think the signedness of char depends on the implementation. Which means that 
"char" will cover one of them, but not the other. Which is why I was suggesting 
adding "char", "signed char" and "unsigned char". Just to cover all bases.

================
Comment at: tools/lldb-mi/MICmnLLDBDebugger.cpp:835
@@ +834,3 @@
+
+    if (!MI_add_summary(miCategory, "char", MI_char_summary_provider,
+                        lldb::eTypeOptionHideValue | 
lldb::eTypeOptionSkipPointers))
----------------
evgeny777 wrote:
> granata.enrico wrote:
> > evgeny777 wrote:
> > > granata.enrico wrote:
> > > > Should you also cover "signed char" and "unsigned char" here?
> > > Hmm. I thought that if regex is false, exact match will be done, won't 
> > > it? If yes than simple char type should be signed, right?
> > I think the signedness of char depends on the implementation. Which means 
> > that "char" will cover one of them, but not the other. Which is why I was 
> > suggesting adding "char", "signed char" and "unsigned char". Just to cover 
> > all bases.
> unsigned - not. signed -yes. One question: if I register summary for "char" - 
> it will not be called for "unsigned char" and "signed char", right?
> If so I will need adding "signed char" and no checks for signed/unsigned 
> inside summary provider are required, correct?
Correct. It will only be called for an exactly matching type name. We strip 
"useless" qualifiers like "volatile" and "restrict" before doing format 
matching. But, for obvious reasons, not signed and unsigned.

Well, if you add separate formatters for signed char vs. unsigned char, then 
they will know of course
The one for plain "char" might still need to figure it out though. Because 
given just "char", the signedness depends on the underlying compiler. I know 
internally we have support for this. If we don't in the SB API, we may need to 
add support. But that seems like it can be done in a subsequent revision.


http://reviews.llvm.org/D13799



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to