JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

A few more nits but otherwise this LGTM.



================
Comment at: tools/lldb-test/lldb-test.cpp:463
 
   DebuggerLifetime->Terminate();
   return 0;
----------------
labath wrote:
> JDevlieghere wrote:
> > If we can wrap this in a RAII object we could have this tool return a 
> > non-zero exit code in case of an error. 
> Done. I've made the individual functions return an `int`, and had `main` 
> forward that. The reason I am not having the functions return an `Error` or 
> like is that the functions generally do the same thing over several inputs, 
> and the errors that happen when processing one of the inputs should be 
> printed next to that input and not deferred until the end. So, the functions 
> just accumulate a flag saying whether they encountered any errors and then 
> return that.
Alright, works for me!


================
Comment at: tools/lldb-test/lldb-test.cpp:481
+    return dumpModules(*Dbg);
+ if (opts::SymbolsSubcommand)
+    return opts::symbols::dumpSymbols(*Dbg);
----------------
formatting


================
Comment at: tools/lldb-test/lldb-test.cpp:484
 
-  DebuggerLifetime->Terminate();
-  return 0;
+ errs() << "No command specified.\n";
+ return 1;
----------------
`WithColor:error()`? :-) 


https://reviews.llvm.org/D46318



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

Reply via email to