[lldb-dev] raw c strings in lldb

dawn at burble.org dawn at burble.org
Tue Feb 24 21:34:31 PST 2015


Please keep in mind that we need to be able to handle Unicode strings
and filenames, so please don't do anything that makes the handling of
Unicode strings worse.  I.e. please don't add any (more) code which
assumes a string is NULL-terminated.

Thanks,
-Dawn

On Wed, Feb 11, 2015 at 07:52:26PM +0000, Zachary Turner wrote:
> On Wed Feb 11 2015 at 11:13:22 AM Greg Clayton <gclayton at apple.com> wrote:
> 
> >
> > > Operations:
> > > strcpy, strncpy, etc         // Use member functions of SmallString /
> > StringRef
> > > sprintf, snprintf, etc       // Use llvm::raw_ostream
> >
> > We have StringStream, people should be using that. raw_ostream doesn't
> > support all printf style formats. So all sprintf  and snprintf function
> > calls should switch to using lldb_private::StreamString.
> >
> 
> What if llvm::SmallString<> had Format methods that delegated to snprintf
> etc?  Then everything would just work, and it would integrate nicely with
> the rest of my suggested points such as converting things to StringRef,
> SmallVectorImpl, etc.

> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list