================
Comment at: source/Commands/CommandObjectBugreport.cpp:72
@@ +71,3 @@
+
+                char command_buffer[256];
+
----------------
I'd defined this buffer before the loop to avoid memory allocation per each 
frame. 

================
Comment at: source/Commands/CommandObjectBugreport.cpp:88
@@ +87,3 @@
+            
+            uint32_t open_options = File::eOpenOptionWrite | 
File::eOpenOptionCanCreate | File::eOpenOptionAppend;
+            const bool append = 
m_outfile_options.GetAppend().GetCurrentValue();
----------------
File::eOpenOptionCloseOnExec ?

================
Comment at: source/Commands/CommandObjectBugreport.cpp:94
@@ +93,3 @@
+            StreamFileSP outfile_stream = std::make_shared<StreamFile>();
+            if (outfile_stream->GetFile().Open(path, open_options).Success())
+            {
----------------
Could you add a returned error to result.AppendErrorWithFormat ?

================
Comment at: source/Commands/CommandObjectBugreport.cpp:106
@@ +105,3 @@
+
+        CommandInterpreterRunOptions options;
+        options.SetStopOnError(false);
----------------
This block might be generic for all multiword commands and you may put it into 
CommandObjectMultiwordBugreport

http://reviews.llvm.org/D10868

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to