[Lldb-commits] [PATCH] D32366: Set "success" status correctly

2017-08-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment.

Yes: lldbassert would be fine for that since those get compiled out during 
release. Patch looks fine. If we already have a test that would trigger the new 
"lldbassert" you will add, then no need for a special test for this, else we 
need a test that triggers this.


Repository:
  rL LLVM

https://reviews.llvm.org/D32366



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


[Lldb-commits] [PATCH] D32366: Set "success" status correctly

2017-08-28 Thread John Lindal via Phabricator via lldb-commits
jafl added a comment.

I will try to ensure that the lldbassert gets tested, but right now, none of 
the tests work on my machine.  I emailed lldb-dev for help.


Repository:
  rL LLVM

https://reviews.llvm.org/D32366



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


[Lldb-commits] [PATCH] D32366: Set "success" status correctly

2017-08-28 Thread John Lindal via Phabricator via lldb-commits
jafl updated this revision to Diff 112922.
jafl added a comment.

Added lldbassert


https://reviews.llvm.org/D32366

Files:
  source/Commands/CommandObjectRegister.cpp
  source/Interpreter/CommandInterpreter.cpp


Index: source/Interpreter/CommandInterpreter.cpp
===
--- source/Interpreter/CommandInterpreter.cpp
+++ source/Interpreter/CommandInterpreter.cpp
@@ -68,6 +68,7 @@
 #include "lldb/Target/Thread.h"
 
 #include "lldb/Utility/CleanUp.h"
+#include "lldb/Utility/LLDBAssert.h"
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
@@ -1675,6 +1676,7 @@
   remainder.c_str());
 
 cmd_obj->Execute(remainder.c_str(), result);
+lldbassert(eReturnStatusStarted != result.GetStatus());
   } else {
 // We didn't find the first command object, so complete the first argument.
 Args command_args(command_string);
Index: source/Commands/CommandObjectRegister.cpp
===
--- source/Commands/CommandObjectRegister.cpp
+++ source/Commands/CommandObjectRegister.cpp
@@ -171,7 +171,9 @@
   set_idx = 
m_command_options.set_indexes[i]->GetUInt64Value(UINT32_MAX,
  nullptr);
   if (set_idx < reg_ctx->GetRegisterSetCount()) {
-if (!DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx)) {
+if (DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx)) {
+  result.SetStatus(eReturnStatusSuccessFinishResult);
+} else {
   if (errno)
 result.AppendErrorWithFormatv("register read failed: {0}\n",
   llvm::sys::StrError());
@@ -196,6 +198,7 @@
   // registers.
   DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx,
   !m_command_options.dump_all_sets.GetCurrentValue());
+  result.SetStatus(eReturnStatusSuccessFinishResult);
 }
   }
 } else {
@@ -220,7 +223,9 @@
   reg_info = reg_ctx->GetRegisterInfoByName(arg_str);
 
   if (reg_info) {
-if (!DumpRegister(m_exe_ctx, strm, reg_ctx, reg_info))
+if (DumpRegister(m_exe_ctx, strm, reg_ctx, reg_info))
+  result.SetStatus(eReturnStatusSuccessFinishResult);
+else
   strm.Printf("%-12s = error: unavailable\n", reg_info->name);
   } else {
 result.AppendErrorWithFormat("Invalid register name '%s'.\n",


Index: source/Interpreter/CommandInterpreter.cpp
===
--- source/Interpreter/CommandInterpreter.cpp
+++ source/Interpreter/CommandInterpreter.cpp
@@ -68,6 +68,7 @@
 #include "lldb/Target/Thread.h"
 
 #include "lldb/Utility/CleanUp.h"
+#include "lldb/Utility/LLDBAssert.h"
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
@@ -1675,6 +1676,7 @@
   remainder.c_str());
 
 cmd_obj->Execute(remainder.c_str(), result);
+lldbassert(eReturnStatusStarted != result.GetStatus());
   } else {
 // We didn't find the first command object, so complete the first argument.
 Args command_args(command_string);
Index: source/Commands/CommandObjectRegister.cpp
===
--- source/Commands/CommandObjectRegister.cpp
+++ source/Commands/CommandObjectRegister.cpp
@@ -171,7 +171,9 @@
   set_idx = m_command_options.set_indexes[i]->GetUInt64Value(UINT32_MAX,
  nullptr);
   if (set_idx < reg_ctx->GetRegisterSetCount()) {
-if (!DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx)) {
+if (DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx)) {
+  result.SetStatus(eReturnStatusSuccessFinishResult);
+} else {
   if (errno)
 result.AppendErrorWithFormatv("register read failed: {0}\n",
   llvm::sys::StrError());
@@ -196,6 +198,7 @@
   // registers.
   DumpRegisterSet(m_exe_ctx, strm, reg_ctx, set_idx,
   !m_command_options.dump_all_sets.GetCurrentValue());
+  result.SetStatus(eReturnStatusSuccessFinishResult);
 }
   }
 } else {
@@ -220,7 +223,9 @@
   reg_info = reg_ctx->GetRegisterInfoByName(arg_str);
 
   if (reg_info) {
-if (!DumpRegister(m_exe_ctx, strm, reg_ctx, reg_info))
+if (DumpRegister(m_exe_ctx, strm, reg_ctx, reg_info))
+  result.SetStatus(eReturnStatusSuccessFinishResult);
+else
   strm.Printf("%-12s = error: unavailable\n", reg_info->name);
   } else {
 result.AppendErrorWithFormat("Invalid register name '%s'.\n",
___
lldb-commits mailing list
lldb-commit

[Lldb-commits] [PATCH] D32366: Set "success" status correctly

2017-08-28 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment.

This is sure to trigger things in the test suite. We will need to ensure a few 
things:

- test suite runs cleanly in debug mode after the lldbassert is added
- without changes to CommandObjectRegister.cpp that the lldbassert is 
triggered, and if not, add a test


https://reviews.llvm.org/D32366



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


[Lldb-commits] [PATCH] D32366: Set "success" status correctly

2017-08-28 Thread John Lindal via Phabricator via lldb-commits
jafl added a comment.

Absolutely!


https://reviews.llvm.org/D32366



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


[Lldb-commits] [lldb] r311978 - update xpc service name.

2017-08-28 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Mon Aug 28 21:28:48 2017
New Revision: 311978

URL: http://llvm.org/viewvc/llvm-project?rev=311978&view=rev
Log:
update xpc service name.

Modified:
lldb/trunk/source/Host/macosx/Host.mm

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=311978&r1=311977&r2=311978&view=diff
==
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Mon Aug 28 21:28:48 2017
@@ -20,7 +20,7 @@
 #define __XPC_PRIVATE_H__
 #include 
 
-#define LaunchUsingXPCRightName "com.apple.dt.Xcode.RootDebuggingXPCService"
+#define LaunchUsingXPCRightName "com.apple.lldb.RootDebuggingXPCService"
 
 // These XPC messaging keys are used for communication between Host.mm and the
 // XPC service.


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


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-08-28 Thread vignesh balu via Phabricator via lldb-commits
vbalu requested changes to this revision.
vbalu added a comment.
This revision now requires changes to proceed.

  if (::sysctl(mib, 4, pathname, &len, NULL, 0) == 0)

"len" is not declared. Please change to "pathname_len".


https://reviews.llvm.org/D32271



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