[Lldb-commits] [PATCH] D46810: 3/3: Fix DWARFUnit::GetUnitDIEPtrOnly stale pointer

2018-09-27 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:179
+  if (!m_die_array.empty()) {
+lldbassert(!m_first_die || m_first_die == m_die_array.front());
+m_first_die = m_die_array.front();

@jankratochvil is this correct assert? Our downstream lldb based on lldb 7 with 
our custom targets hits this assert.  If we remove it, we see no obvious 
breakages.


Repository:
  rL LLVM

https://reviews.llvm.org/D46810



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


[Lldb-commits] [PATCH] D46810: 3/3: Fix DWARFUnit::GetUnitDIEPtrOnly stale pointer

2018-09-27 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:179
+  if (!m_die_array.empty()) {
+lldbassert(!m_first_die || m_first_die == m_die_array.front());
+m_first_die = m_die_array.front();

xbolva00 wrote:
> @jankratochvil is this correct assert? Our downstream lldb based on lldb 7 
> with our custom targets hits this assert.  If we remove it, we see no obvious 
> breakages.
cc @labath 


Repository:
  rL LLVM

https://reviews.llvm.org/D46810



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


[Lldb-commits] [PATCH] D52561: Refactor ClangUserExpression::GetLanguageForExpr

2018-09-27 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 accepted this revision.
xbolva00 added a comment.
This revision is now accepted and ready to land.

looks fine, thanks :)


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D52561



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


[Lldb-commits] [PATCH] D52543: [DWARFSymbolFile] Adds the module lock to all virtual methods from SymbolFile

2018-09-27 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: source/Symbol/SymbolFile.cpp:160
+  // guarantee correctness.
+  assert(std::async(
+ std::launch::async,

lldbassert?


https://reviews.llvm.org/D52543



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


[Lldb-commits] [PATCH] D53010: Add an alias "var" for "frame var" and "vo" for "frame var -O"

2018-10-10 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D53010#1260956, @aprantl wrote:

> Currently `v` is an alias for `version`. I'd wager that — compared to 
> printing a variable — LLDB user's almost never want to print LLDB's version. 
> Would it make sense to re-purpose the single-letter `v` abbreviation for the 
> much more frequently used `frame variable` action?


+1 for v as an alias for frame variable.


Repository:
  rL LLVM

https://reviews.llvm.org/D53010



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


[Lldb-commits] [PATCH] D53255: Fix: Assertion failed: (!m_first_die || m_first_die == m_die_array.front()), function ExtractDIEsRWLocked

2018-10-14 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

reproducer archive - 404 not found


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D53255



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


[Lldb-commits] [PATCH] D53255: Fix: Assertion failed: (!m_first_die || m_first_die == m_die_array.front()), function ExtractDIEsRWLocked

2018-10-14 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In our case (yes, we have some "additional dwarf", we are gonna fix it on our 
side), it crashed with "process launch -s".


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D53255



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


[Lldb-commits] [PATCH] D53255: Fix: Assertion failed: (!m_first_die || m_first_die == m_die_array.front()), function ExtractDIEsRWLocked

2018-10-15 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 accepted this revision.
xbolva00 added a comment.
This revision is now accepted and ready to land.

assert fix looks fine


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D53255



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


[Lldb-commits] [PATCH] D52981: [LLDB] - Add basic support for .debug_rnglists section (DWARF5)

2018-10-31 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp:163
+  uint64_t length = data.GetU32(&offset);
+  bool isDwarf64 = false;
+  if (length == 0x) {

variable is not used anywhere


Repository:
  rL LLVM

https://reviews.llvm.org/D52981



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


[Lldb-commits] [PATCH] D51587: [Symtab][NFC] Added llvm_unreachable to supress compiler warning

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added a reviewer: JDevlieghere.
Herald added a subscriber: lldb-commits.

Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51587

Files:
  source/Symbol/Symtab.cpp


Index: source/Symbol/Symtab.cpp
===
--- source/Symbol/Symtab.cpp
+++ source/Symbol/Symtab.cpp
@@ -249,6 +249,7 @@
   case Mangled::eManglingSchemeNone:
 return true;
   }
+  llvm_unreachable("unknown scheme!");
 }
 
 void Symtab::InitNameIndexes() {


Index: source/Symbol/Symtab.cpp
===
--- source/Symbol/Symtab.cpp
+++ source/Symbol/Symtab.cpp
@@ -249,6 +249,7 @@
   case Mangled::eManglingSchemeNone:
 return true;
   }
+  llvm_unreachable("unknown scheme!");
 }
 
 void Symtab::InitNameIndexes() {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51587: [Symtab][NFC] Added llvm_unreachable to supress compiler warning

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D51587#1222009, @JDevlieghere wrote:

> Looks reasonable. Did you run into this or is it just an improvement as you 
> came across the code?


I just saw it as one of many GCC warnings when building lldb trunk.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51587



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


[Lldb-commits] [PATCH] D51591: [PseudoTerminal] Use llvm errno helpers

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added a reviewer: JDevlieghere.
Herald added subscribers: lldb-commits, abidh.

LLVM provide (str)errno helpers, so convert code to use it.

Also fixes warning:
/home/xbolva00/LLVM/llvm/tools/lldb/source/Host/common/PseudoTerminal.cpp:248:25:
 warning: ignoring return value of ‘char* strerror_r(int, char*, size_t)’, 
declared with attribute warn_unused_result [-Wunused-result]

  ::strerror_r(errno, error_str, error_len);


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51591

Files:
  source/Host/common/PseudoTerminal.cpp

Index: source/Host/common/PseudoTerminal.cpp
===
--- source/Host/common/PseudoTerminal.cpp
+++ source/Host/common/PseudoTerminal.cpp
@@ -10,6 +10,8 @@
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Host/Config.h"
 
+#include "llvm/Support/Errno.h"
+
 #include 
 #include 
 #include 
@@ -83,27 +85,34 @@
   if (error_str)
 error_str[0] = '\0';
 
+  std::string strerror;
 #if !defined(LLDB_DISABLE_POSIX)
   // Open the master side of a pseudo terminal
   m_master_fd = ::posix_openpt(oflag);
   if (m_master_fd < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 return false;
   }
 
   // Grant access to the slave pseudo terminal
   if (::grantpt(m_master_fd) < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 CloseMasterFileDescriptor();
 return false;
   }
 
   // Clear the lock flag on the slave pseudo terminal
   if (::unlockpt(m_master_fd) < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 CloseMasterFileDescriptor();
 return false;
   }
@@ -131,6 +140,7 @@
   if (error_str)
 error_str[0] = '\0';
 
+  std::string strerror;
   CloseSlaveFileDescriptor();
 
   // Open the master side of a pseudo terminal
@@ -142,8 +152,10 @@
   m_slave_fd = ::open(slave_name, oflag);
 
   if (m_slave_fd < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 return false;
   }
 
@@ -166,16 +178,19 @@
   if (error_str)
 error_str[0] = '\0';
 
+  std::string strerror;
   if (m_master_fd < 0) {
 if (error_str)
   ::snprintf(error_str, error_len, "%s",
  "master file descriptor is invalid");
 return nullptr;
   }
   const char *slave_name = ::ptsname(m_master_fd);
 
-  if (error_str && slave_name == nullptr)
-::strerror_r(errno, error_str, error_len);
+  if (error_str && slave_name == nullptr) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 
   return slave_name;
 }
@@ -202,6 +217,8 @@
 lldb::pid_t PseudoTerminal::Fork(char *error_str, size_t error_len) {
   if (error_str)
 error_str[0] = '\0';
+
+  std::string strerror;
   pid_t pid = LLDB_INVALID_PROCESS_ID;
 #if !defined(LLDB_DISABLE_POSIX)
   int flags = O_RDWR;
@@ -212,8 +229,10 @@
 pid = ::fork();
 if (pid < 0) {
   // Fork failed
-  if (error_str)
-::strerror_r(errno, error_str, error_len);
+  if (error_str) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 } else if (pid == 0) {
   // Child Process
   ::setsid();
@@ -228,24 +247,32 @@
 #if defined(TIOCSCTTY)
 // Acquire the controlling terminal
 if (::ioctl(m_slave_fd, TIOCSCTTY, (char *)0) < 0) {
-  if (error_str)
-::strerror_r(errno, error_str, error_len);
+  if (error_str) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 #endif
 // Duplicate all stdio file descriptors to the slave pseudo terminal
 if (::dup2(m_slave_fd, STDIN_FILENO) != STDIN_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 
 if (::dup2(m_slave_fd, STDOUT_FILENO) != STDOUT_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  

[Lldb-commits] [PATCH] D51591: [PseudoTerminal] Use llvm errno helpers

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 163705.
xbolva00 added a comment.

- Moved variable into #if block


https://reviews.llvm.org/D51591

Files:
  source/Host/common/PseudoTerminal.cpp

Index: source/Host/common/PseudoTerminal.cpp
===
--- source/Host/common/PseudoTerminal.cpp
+++ source/Host/common/PseudoTerminal.cpp
@@ -10,6 +10,8 @@
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Host/Config.h"
 
+#include "llvm/Support/Errno.h"
+
 #include 
 #include 
 #include 
@@ -84,26 +86,33 @@
 error_str[0] = '\0';
 
 #if !defined(LLDB_DISABLE_POSIX)
+  std::string strerror;
   // Open the master side of a pseudo terminal
   m_master_fd = ::posix_openpt(oflag);
   if (m_master_fd < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 return false;
   }
 
   // Grant access to the slave pseudo terminal
   if (::grantpt(m_master_fd) < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 CloseMasterFileDescriptor();
 return false;
   }
 
   // Clear the lock flag on the slave pseudo terminal
   if (::unlockpt(m_master_fd) < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 CloseMasterFileDescriptor();
 return false;
   }
@@ -131,6 +140,7 @@
   if (error_str)
 error_str[0] = '\0';
 
+  std::string strerror;
   CloseSlaveFileDescriptor();
 
   // Open the master side of a pseudo terminal
@@ -142,8 +152,10 @@
   m_slave_fd = ::open(slave_name, oflag);
 
   if (m_slave_fd < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 return false;
   }
 
@@ -166,16 +178,19 @@
   if (error_str)
 error_str[0] = '\0';
 
+  std::string strerror;
   if (m_master_fd < 0) {
 if (error_str)
   ::snprintf(error_str, error_len, "%s",
  "master file descriptor is invalid");
 return nullptr;
   }
   const char *slave_name = ::ptsname(m_master_fd);
 
-  if (error_str && slave_name == nullptr)
-::strerror_r(errno, error_str, error_len);
+  if (error_str && slave_name == nullptr) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 
   return slave_name;
 }
@@ -204,16 +219,19 @@
 error_str[0] = '\0';
   pid_t pid = LLDB_INVALID_PROCESS_ID;
 #if !defined(LLDB_DISABLE_POSIX)
+  std::string strerror;
   int flags = O_RDWR;
   flags |= O_CLOEXEC;
   if (OpenFirstAvailableMaster(flags, error_str, error_len)) {
 // Successfully opened our master pseudo terminal
 
 pid = ::fork();
 if (pid < 0) {
   // Fork failed
-  if (error_str)
-::strerror_r(errno, error_str, error_len);
+  if (error_str) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 } else if (pid == 0) {
   // Child Process
   ::setsid();
@@ -228,24 +246,32 @@
 #if defined(TIOCSCTTY)
 // Acquire the controlling terminal
 if (::ioctl(m_slave_fd, TIOCSCTTY, (char *)0) < 0) {
-  if (error_str)
-::strerror_r(errno, error_str, error_len);
+  if (error_str) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 #endif
 // Duplicate all stdio file descriptors to the slave pseudo terminal
 if (::dup2(m_slave_fd, STDIN_FILENO) != STDIN_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 
 if (::dup2(m_slave_fd, STDOUT_FILENO) != STDOUT_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 
 if (::dup2(m_slave_fd, STDERR_FILENO) != STDERR_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
  

[Lldb-commits] [PATCH] D51591: [PseudoTerminal] Use llvm errno helpers

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 163706.
xbolva00 added a comment.

- Removed include errno.h


https://reviews.llvm.org/D51591

Files:
  source/Host/common/PseudoTerminal.cpp

Index: source/Host/common/PseudoTerminal.cpp
===
--- source/Host/common/PseudoTerminal.cpp
+++ source/Host/common/PseudoTerminal.cpp
@@ -10,7 +10,8 @@
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Host/Config.h"
 
-#include 
+#include "llvm/Support/Errno.h"
+
 #include 
 #include 
 #include 
@@ -84,26 +85,33 @@
 error_str[0] = '\0';
 
 #if !defined(LLDB_DISABLE_POSIX)
+  std::string strerror;
   // Open the master side of a pseudo terminal
   m_master_fd = ::posix_openpt(oflag);
   if (m_master_fd < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 return false;
   }
 
   // Grant access to the slave pseudo terminal
   if (::grantpt(m_master_fd) < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 CloseMasterFileDescriptor();
 return false;
   }
 
   // Clear the lock flag on the slave pseudo terminal
   if (::unlockpt(m_master_fd) < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 CloseMasterFileDescriptor();
 return false;
   }
@@ -131,6 +139,7 @@
   if (error_str)
 error_str[0] = '\0';
 
+  std::string strerror;
   CloseSlaveFileDescriptor();
 
   // Open the master side of a pseudo terminal
@@ -142,8 +151,10 @@
   m_slave_fd = ::open(slave_name, oflag);
 
   if (m_slave_fd < 0) {
-if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+if (error_str) {
+  strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
 return false;
   }
 
@@ -166,16 +177,19 @@
   if (error_str)
 error_str[0] = '\0';
 
+  std::string strerror;
   if (m_master_fd < 0) {
 if (error_str)
   ::snprintf(error_str, error_len, "%s",
  "master file descriptor is invalid");
 return nullptr;
   }
   const char *slave_name = ::ptsname(m_master_fd);
 
-  if (error_str && slave_name == nullptr)
-::strerror_r(errno, error_str, error_len);
+  if (error_str && slave_name == nullptr) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 
   return slave_name;
 }
@@ -204,16 +218,19 @@
 error_str[0] = '\0';
   pid_t pid = LLDB_INVALID_PROCESS_ID;
 #if !defined(LLDB_DISABLE_POSIX)
+  std::string strerror;
   int flags = O_RDWR;
   flags |= O_CLOEXEC;
   if (OpenFirstAvailableMaster(flags, error_str, error_len)) {
 // Successfully opened our master pseudo terminal
 
 pid = ::fork();
 if (pid < 0) {
   // Fork failed
-  if (error_str)
-::strerror_r(errno, error_str, error_len);
+  if (error_str) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 } else if (pid == 0) {
   // Child Process
   ::setsid();
@@ -228,24 +245,32 @@
 #if defined(TIOCSCTTY)
 // Acquire the controlling terminal
 if (::ioctl(m_slave_fd, TIOCSCTTY, (char *)0) < 0) {
-  if (error_str)
-::strerror_r(errno, error_str, error_len);
+  if (error_str) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 #endif
 // Duplicate all stdio file descriptors to the slave pseudo terminal
 if (::dup2(m_slave_fd, STDIN_FILENO) != STDIN_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 
 if (::dup2(m_slave_fd, STDOUT_FILENO) != STDOUT_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 }
 
 if (::dup2(m_slave_fd, STDERR_FILENO) != STDERR_FILENO) {
-  if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+  if (error_str && !error_str[0]) {
+strerror = llvm::sys::StrError();
+::snprintf(error_str, error_len, "%s", strerror.c_str());
+  }
 

[Lldb-commits] [PATCH] D51591: [PseudoTerminal][NFC] Use llvm errno helpers

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 163712.
xbolva00 added a comment.

- Added helper function


https://reviews.llvm.org/D51591

Files:
  source/Host/common/PseudoTerminal.cpp

Index: source/Host/common/PseudoTerminal.cpp
===
--- source/Host/common/PseudoTerminal.cpp
+++ source/Host/common/PseudoTerminal.cpp
@@ -10,7 +10,8 @@
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Host/Config.h"
 
-#include 
+#include "llvm/Support/Errno.h"
+
 #include 
 #include 
 #include 
@@ -27,6 +28,14 @@
 using namespace lldb_private;
 
 //--
+// Write string describing error number
+//--
+static void ErrnoToStr(char *error_str, size_t error_len) {
+  std::string strerror = llvm::sys::StrError();
+  ::snprintf(error_str, error_len, "%s", strerror.c_str());
+}
+
+//--
 // PseudoTerminal constructor
 //--
 PseudoTerminal::PseudoTerminal()
@@ -88,22 +97,22 @@
   m_master_fd = ::posix_openpt(oflag);
   if (m_master_fd < 0) {
 if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+  ErrnoToStr(error_str, error_len);
 return false;
   }
 
   // Grant access to the slave pseudo terminal
   if (::grantpt(m_master_fd) < 0) {
 if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+  ErrnoToStr(error_str, error_len);
 CloseMasterFileDescriptor();
 return false;
   }
 
   // Clear the lock flag on the slave pseudo terminal
   if (::unlockpt(m_master_fd) < 0) {
 if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+  ErrnoToStr(error_str, error_len);
 CloseMasterFileDescriptor();
 return false;
   }
@@ -143,7 +152,7 @@
 
   if (m_slave_fd < 0) {
 if (error_str)
-  ::strerror_r(errno, error_str, error_len);
+  ErrnoToStr(error_str, error_len);
 return false;
   }
 
@@ -175,7 +184,7 @@
   const char *slave_name = ::ptsname(m_master_fd);
 
   if (error_str && slave_name == nullptr)
-::strerror_r(errno, error_str, error_len);
+ErrnoToStr(error_str, error_len);
 
   return slave_name;
 }
@@ -213,7 +222,7 @@
 if (pid < 0) {
   // Fork failed
   if (error_str)
-::strerror_r(errno, error_str, error_len);
+ErrnoToStr(error_str, error_len);
 } else if (pid == 0) {
   // Child Process
   ::setsid();
@@ -229,23 +238,23 @@
 // Acquire the controlling terminal
 if (::ioctl(m_slave_fd, TIOCSCTTY, (char *)0) < 0) {
   if (error_str)
-::strerror_r(errno, error_str, error_len);
+ErrnoToStr(error_str, error_len);
 }
 #endif
 // Duplicate all stdio file descriptors to the slave pseudo terminal
 if (::dup2(m_slave_fd, STDIN_FILENO) != STDIN_FILENO) {
   if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+ErrnoToStr(error_str, error_len);
 }
 
 if (::dup2(m_slave_fd, STDOUT_FILENO) != STDOUT_FILENO) {
   if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+ErrnoToStr(error_str, error_len);
 }
 
 if (::dup2(m_slave_fd, STDERR_FILENO) != STDERR_FILENO) {
   if (error_str && !error_str[0])
-::strerror_r(errno, error_str, error_len);
+ErrnoToStr(error_str, error_len);
 }
   }
 } else {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51600: [NFC] Fixed enum constant in boolean context error

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added a reviewer: JDevlieghere.
Herald added subscribers: lldb-commits, abidh.

/home/xbolva00/LLVM/llvm/tools/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:656:59:
 warning: enum constant in boolean context [-Wint-in-bool-context]

  if (mh.magic == llvm::MachO::MH_CIGAM || llvm::MachO::MH_MAGIC)
^~~~

/home/xbolva00/LLVM/llvm/tools/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:658:62:
 warning: enum constant in boolean context [-Wint-in-bool-context]

  if (mh.magic == llvm::MachO::MH_CIGAM_64 || llvm::MachO::MH_MAGIC_64)


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51600

Files:
  source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp


Index: source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
===
--- source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -652,11 +652,12 @@
 
   llvm::MachO::mach_header mh;
   size_t size_to_read = 512;
-  if (ReadMachHeader (m_load_address, process, mh)) {
-if (mh.magic == llvm::MachO::MH_CIGAM || llvm::MachO::MH_MAGIC)
-  size_to_read = sizeof (llvm::MachO::mach_header) + mh.sizeofcmds;
-if (mh.magic == llvm::MachO::MH_CIGAM_64 || llvm::MachO::MH_MAGIC_64)
-  size_to_read = sizeof (llvm::MachO::mach_header_64) + mh.sizeofcmds;
+  if (ReadMachHeader(m_load_address, process, mh)) {
+if (mh.magic == llvm::MachO::MH_CIGAM || mh.magic == llvm::MachO::MH_MAGIC)
+  size_to_read = sizeof(llvm::MachO::mach_header) + mh.sizeofcmds;
+if (mh.magic == llvm::MachO::MH_CIGAM_64 ||
+mh.magic == llvm::MachO::MH_MAGIC_64)
+  size_to_read = sizeof(llvm::MachO::mach_header_64) + mh.sizeofcmds;
   }
 
   ModuleSP memory_module_sp =


Index: source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
===
--- source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -652,11 +652,12 @@
 
   llvm::MachO::mach_header mh;
   size_t size_to_read = 512;
-  if (ReadMachHeader (m_load_address, process, mh)) {
-if (mh.magic == llvm::MachO::MH_CIGAM || llvm::MachO::MH_MAGIC)
-  size_to_read = sizeof (llvm::MachO::mach_header) + mh.sizeofcmds;
-if (mh.magic == llvm::MachO::MH_CIGAM_64 || llvm::MachO::MH_MAGIC_64)
-  size_to_read = sizeof (llvm::MachO::mach_header_64) + mh.sizeofcmds;
+  if (ReadMachHeader(m_load_address, process, mh)) {
+if (mh.magic == llvm::MachO::MH_CIGAM || mh.magic == llvm::MachO::MH_MAGIC)
+  size_to_read = sizeof(llvm::MachO::mach_header) + mh.sizeofcmds;
+if (mh.magic == llvm::MachO::MH_CIGAM_64 ||
+mh.magic == llvm::MachO::MH_MAGIC_64)
+  size_to_read = sizeof(llvm::MachO::mach_header_64) + mh.sizeofcmds;
   }
 
   ModuleSP memory_module_sp =
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51601: [NFC] Use llvm_unreachable instead of lldb::assert

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added a reviewer: JDevlieghere.
Herald added a subscriber: lldb-commits.

Fixes implicit fall through warnings


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51601

Files:
  source/Host/common/Editline.cpp


Index: source/Host/common/Editline.cpp
===
--- source/Host/common/Editline.cpp
+++ source/Host/common/Editline.cpp
@@ -526,7 +526,7 @@
 break;
 
   case lldb::eConnectionStatusInterrupted:
-lldbassert(0 && "Interrupts should have been handled above.");
+llvm_unreachable("Interrupts should have been handled above.");
 
   case lldb::eConnectionStatusError:// Check GetError() for details
   case lldb::eConnectionStatusTimedOut: // Request timed out


Index: source/Host/common/Editline.cpp
===
--- source/Host/common/Editline.cpp
+++ source/Host/common/Editline.cpp
@@ -526,7 +526,7 @@
 break;
 
   case lldb::eConnectionStatusInterrupted:
-lldbassert(0 && "Interrupts should have been handled above.");
+llvm_unreachable("Interrupts should have been handled above.");
 
   case lldb::eConnectionStatusError:// Check GetError() for details
   case lldb::eConnectionStatusTimedOut: // Request timed out
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51604: Terminate debugger if an assert was hit

2018-09-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added reviewers: JDevlieghere, teemperor.
Herald added a subscriber: lldb-commits.

Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51604

Files:
  source/Utility/LLDBAssert.cpp


Index: source/Utility/LLDBAssert.cpp
===
--- source/Utility/LLDBAssert.cpp
+++ source/Utility/LLDBAssert.cpp
@@ -28,5 +28,6 @@
 llvm::sys::PrintStackTrace(errs());
 errs() << "please file a bug report against lldb reporting this failure "
   "log, and as many details as possible\n";
+exit(1);  
   }
 }


Index: source/Utility/LLDBAssert.cpp
===
--- source/Utility/LLDBAssert.cpp
+++ source/Utility/LLDBAssert.cpp
@@ -28,5 +28,6 @@
 llvm::sys::PrintStackTrace(errs());
 errs() << "please file a bug report against lldb reporting this failure "
   "log, and as many details as possible\n";
+exit(1);  
   }
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added reviewers: JDevlieghere, teemperor.
Herald added subscribers: lldb-commits, abidh.

Windows console now supports supports ANSI escape codes, but we need to enable 
it using SetConsoleMode with ENABLE_VIRTUAL_TERMINAL_PROCESSING flag.

https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences.

Syntax hightlighting now works fine on Windows:
https://i.imgur.com/P0i04A7.png


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51615

Files:
  source/Core/Debugger.cpp


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,6 +50,12 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "windows.h"
+
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+#endif
+
 #endif
 
 #include "llvm/ADT/None.h"  // for None
@@ -804,6 +810,14 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32)
+  HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+  DWORD consoleMode;
+  GetConsoleMode(hConsole, &consoleMode);
+  consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  SetUseColor(SetConsoleMode(hConsole, consoleMode));
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,6 +50,12 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "windows.h"
+
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+#endif
+
 #endif
 
 #include "llvm/ADT/None.h"  // for None
@@ -804,6 +810,14 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32)
+  HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+  DWORD consoleMode;
+  GetConsoleMode(hConsole, &consoleMode);
+  consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  SetUseColor(SetConsoleMode(hConsole, consoleMode));
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D51615#1222730, @teemperor wrote:

> Thanks! Didn't know we can activate this setting for the user.
>
> Some questions though: Should we restore this setting to the original value 
> after LLDB shuts down?


Good question. I tried run lldb, quit it and then I ran echo some ansi code in 
the same terminal. Ansi code wasn't resolved (same behaviour as before LLDB 
launch), so LLDB didn't modify something globally in the terminal.
I think we don't need to restore original value, but... suggestions welcome! :)

> And what happens if this code runs on a Windows version before 
> ENABLE_VIRTUAL_TERMINAL_PROCESSING was introduced? I see there some fallback 
> code, but it's not clear to me what it does and what will happen on older 
> platforms.

On older systems there is no ENABLE_VIRTUAL_TERMINAL_PROCESSING so we have
SetConsoleMode(0x004). On older systems Windows does not recognize 0x004 and 
function will return false.




Comment at: source/Core/Debugger.cpp:56
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+#endif

teemperor wrote:
> Can you document why this has to be 0x0004? I assume older Windows versions 
> won't have ENABLE_VIRTUAL_TERMINAL_PROCESSING, so that should also be 
> documented that this code is covering this case.
https://docs.microsoft.com/en-us/windows/console/setconsolemode

Should I add a comment with this link?



Comment at: source/Core/Debugger.cpp:815
+#if defined(_WIN32)
+  HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+  DWORD consoleMode;

teemperor wrote:
> A comment here would be nice. E.g. `// Enabling use of ANSI color codes 
> because LLDB is using them to highlight text.
Alright, will do.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51615



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


[Lldb-commits] [PATCH] D51604: Terminate debugger if an assert was hit

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: source/Utility/LLDBAssert.cpp:23
   if (expression)
 ;
   else {

JDevlieghere wrote:
> I guess while we're at it we can turn this into an early return and use 
> LLVM_LIKELY?
> 
> ```
> if (LLVM_LIKELY(expression))
> return;
> ```
I thought about it also.. :) I will update the patch.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51604



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


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: source/Core/Debugger.cpp:819
+  consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  SetUseColor(SetConsoleMode(hConsole, consoleMode));
+#endif

Should I rewrite it to more clear version like

bool ansi_supported = SetConsoleMode(hConsole, consoleMode);
SetUseColor(ansi_supported);

?


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51615



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


[Lldb-commits] [PATCH] D51604: Terminate debugger if an assert was hit

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 163818.
xbolva00 added a comment.

- Use early return


https://reviews.llvm.org/D51604

Files:
  source/Utility/LLDBAssert.cpp


Index: source/Utility/LLDBAssert.cpp
===
--- source/Utility/LLDBAssert.cpp
+++ source/Utility/LLDBAssert.cpp
@@ -19,14 +19,14 @@
 void lldb_private::lldb_assert(bool expression, const char *expr_text,
const char *func, const char *file,
unsigned int line) {
-  if (expression)
-;
-  else {
-errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
- expr_text, func, file, line);
-errs() << "backtrace leading to the failure:\n";
-llvm::sys::PrintStackTrace(errs());
-errs() << "please file a bug report against lldb reporting this failure "
-  "log, and as many details as possible\n";
-  }
+  if (LLVM_LIKELY(expression))
+return;
+
+  errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
+   expr_text, func, file, line);
+  errs() << "backtrace leading to the failure:\n";
+  llvm::sys::PrintStackTrace(errs());
+  errs() << "please file a bug report against lldb reporting this failure "
+"log, and as many details as possible\n";
+  exit(1);
 }


Index: source/Utility/LLDBAssert.cpp
===
--- source/Utility/LLDBAssert.cpp
+++ source/Utility/LLDBAssert.cpp
@@ -19,14 +19,14 @@
 void lldb_private::lldb_assert(bool expression, const char *expr_text,
const char *func, const char *file,
unsigned int line) {
-  if (expression)
-;
-  else {
-errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
- expr_text, func, file, line);
-errs() << "backtrace leading to the failure:\n";
-llvm::sys::PrintStackTrace(errs());
-errs() << "please file a bug report against lldb reporting this failure "
-  "log, and as many details as possible\n";
-  }
+  if (LLVM_LIKELY(expression))
+return;
+
+  errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
+   expr_text, func, file, line);
+  errs() << "backtrace leading to the failure:\n";
+  llvm::sys::PrintStackTrace(errs());
+  errs() << "please file a bug report against lldb reporting this failure "
+"log, and as many details as possible\n";
+  exit(1);
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 163820.
xbolva00 added a comment.

- Addressed review comments


https://reviews.llvm.org/D51615

Files:
  source/Core/Debugger.cpp


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,8 +50,15 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "windows.h"
+
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+// See https://docs.microsoft.com/en-us/windows/console/setconsolemode
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
 #endif
 
+#endif
+
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
@@ -804,6 +811,17 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
+  DWORD console_mode;
+  GetConsoleMode(console_handle, &console_mode);
+  console_mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  bool ansi_colors_supported = SetConsoleMode(console_handle, console_mode);
+  SetUseColor(ansi_colors_supported);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,8 +50,15 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "windows.h"
+
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+// See https://docs.microsoft.com/en-us/windows/console/setconsolemode
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
 #endif
 
+#endif
+
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
@@ -804,6 +811,17 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
+  DWORD console_mode;
+  GetConsoleMode(console_handle, &console_mode);
+  console_mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  bool ansi_colors_supported = SetConsoleMode(console_handle, console_mode);
+  SetUseColor(ansi_colors_supported);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51600: [NFC] Fixed enum constant in boolean context error

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D51600#1223303, @clayborg wrote:

> If you insert the text:
>
>   Differential Revision: https://reviews.llvm.org/D51600
>
>
> Into your commit it will automatically show the SVN revision that was used 
> for the commit. Can you attach the SVN revision to this as a comment so we 
> can track this?




In https://reviews.llvm.org/D51600#1223308, @teemperor wrote:

> (you can also try arcanist which will do this automatically for you)


Ok, I will add it, thanks.

Btw, it is a bit strange, I used:
arc patch https://reviews.llvm.org/D51600
arc commit --revision https://reviews.llvm.org/D51600


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51600



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


[Lldb-commits] [PATCH] D51600: [NFC] Fixed enum constant in boolean context error

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

Ok, I messed up my LLDB svn a bit yesterday so probably I have found reason of 
that strange behavior. I will re-setup it locally. Thanks.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51600



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


[Lldb-commits] [PATCH] D51604: Terminate debugger if an assert was hit

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 163852.
xbolva00 added a comment.

- Use abort


https://reviews.llvm.org/D51604

Files:
  source/Utility/LLDBAssert.cpp


Index: source/Utility/LLDBAssert.cpp
===
--- source/Utility/LLDBAssert.cpp
+++ source/Utility/LLDBAssert.cpp
@@ -19,14 +19,14 @@
 void lldb_private::lldb_assert(bool expression, const char *expr_text,
const char *func, const char *file,
unsigned int line) {
-  if (expression)
-;
-  else {
-errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
- expr_text, func, file, line);
-errs() << "backtrace leading to the failure:\n";
-llvm::sys::PrintStackTrace(errs());
-errs() << "please file a bug report against lldb reporting this failure "
-  "log, and as many details as possible\n";
-  }
+  if (LLVM_LIKELY(expression))
+return;
+
+  errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
+   expr_text, func, file, line);
+  errs() << "backtrace leading to the failure:\n";
+  llvm::sys::PrintStackTrace(errs());
+  errs() << "please file a bug report against lldb reporting this failure "
+"log, and as many details as possible\n";
+  abort();
 }


Index: source/Utility/LLDBAssert.cpp
===
--- source/Utility/LLDBAssert.cpp
+++ source/Utility/LLDBAssert.cpp
@@ -19,14 +19,14 @@
 void lldb_private::lldb_assert(bool expression, const char *expr_text,
const char *func, const char *file,
unsigned int line) {
-  if (expression)
-;
-  else {
-errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
- expr_text, func, file, line);
-errs() << "backtrace leading to the failure:\n";
-llvm::sys::PrintStackTrace(errs());
-errs() << "please file a bug report against lldb reporting this failure "
-  "log, and as many details as possible\n";
-  }
+  if (LLVM_LIKELY(expression))
+return;
+
+  errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
+   expr_text, func, file, line);
+  errs() << "backtrace leading to the failure:\n";
+  llvm::sys::PrintStackTrace(errs());
+  errs() << "please file a bug report against lldb reporting this failure "
+"log, and as many details as possible\n";
+  abort();
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51604: Terminate debugger if an assert was hit

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

Thanks for review, commited as https://reviews.llvm.org/rL341387


https://reviews.llvm.org/D51604



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


[Lldb-commits] [PATCH] D51604: Terminate debugger if an assert was hit

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D51604#1223455, @clayborg wrote:

> In https://reviews.llvm.org/D51604#1223451, @xbolva00 wrote:
>
> > Thanks for review, commited as https://reviews.llvm.org/rL341387
>
>
> If you include the text:
>
>   Differential Revision: https://reviews.llvm.org/D51604
>
>
> It will automatically close this and put in a comment with the revision


Ok, I hope it would be okay next time.


https://reviews.llvm.org/D51604



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


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 planned changes to this revision.
xbolva00 added a comment.

I will reuse the accepted code which arrives with 
https://reviews.llvm.org/D51611 here also.


https://reviews.llvm.org/D51615



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


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 163882.
xbolva00 added a comment.

- Updated


https://reviews.llvm.org/D51615

Files:
  source/Core/Debugger.cpp


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,6 +50,7 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
@@ -804,6 +805,17 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
+  DWORD mode;
+  GetConsoleMode(console, &mode);
+  mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  bool supported = SetConsoleMode(console, mode);
+  SetUseColor(supported);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,6 +50,7 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
@@ -804,6 +805,17 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
+  DWORD mode;
+  GetConsoleMode(console, &mode);
+  mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+  bool supported = SetConsoleMode(console, mode);
+  SetUseColor(supported);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-05 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

@teemperor please take a look again :)


https://reviews.llvm.org/D51615



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


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-05 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 164053.
xbolva00 added a comment.

- use llvm::sys::Process::UseANSIEscapeCodes


https://reviews.llvm.org/D51615

Files:
  source/Core/Debugger.cpp


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,6 +50,7 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
@@ -804,6 +805,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,6 +50,7 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
@@ -804,6 +805,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-05 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 164057.

https://reviews.llvm.org/D51615

Files:
  source/Core/Debugger.cpp


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,14 +50,16 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/iterator.h" // for iterator_facade_...
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h" // for raw_fd_ostream
 
@@ -804,6 +806,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,14 +50,16 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/iterator.h" // for iterator_facade_...
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h" // for raw_fd_ostream
 
@@ -804,6 +806,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-05 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 164058.
xbolva00 added a comment.

- Check for _WIN32


https://reviews.llvm.org/D51615

Files:
  source/Core/Debugger.cpp


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,14 +50,16 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/iterator.h" // for iterator_facade_...
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h" // for raw_fd_ostream
 
@@ -804,6 +806,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32) && defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -50,14 +50,16 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/iterator.h" // for iterator_facade_...
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h" // for raw_fd_ostream
 
@@ -804,6 +806,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32) && defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-05 Thread Dávid Bolvanský via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341497: Set Windows console mode to enable support for ansi 
escape codes (authored by xbolva00, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D51615?vs=164058&id=164114#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51615

Files:
  lldb/trunk/source/Core/Debugger.cpp


Index: lldb/trunk/source/Core/Debugger.cpp
===
--- lldb/trunk/source/Core/Debugger.cpp
+++ lldb/trunk/source/Core/Debugger.cpp
@@ -50,14 +50,16 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/iterator.h" // for iterator_facade_...
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h" // for raw_fd_ostream
 
@@ -804,6 +806,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32) && defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }


Index: lldb/trunk/source/Core/Debugger.cpp
===
--- lldb/trunk/source/Core/Debugger.cpp
+++ lldb/trunk/source/Core/Debugger.cpp
@@ -50,14 +50,16 @@
 
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX
+#include "lldb/Host/windows/windows.h"
 #endif
 
 #include "llvm/ADT/None.h"  // for None
 #include "llvm/ADT/STLExtras.h" // for make_unique
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/iterator.h" // for iterator_facade_...
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h" // for raw_fd_ostream
 
@@ -804,6 +806,13 @@
   // Turn off use-color if we don't write to a terminal with color support.
   if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
 SetUseColor(false);
+
+#if defined(_WIN32) && defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  // Enabling use of ANSI color codes because LLDB is using them to highlight
+  // text.
+  llvm::sys::Process::UseANSIEscapeCodes(true);
+  SetUseColor(true);
+#endif
 }
 
 Debugger::~Debugger() { Clear(); }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-06 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

Bot sure how to fix tests since this is somehow hard to problematic.


Repository:
  rL LLVM

https://reviews.llvm.org/D51615



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


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-06 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D51615#1226445, @stella.stamenova wrote:

> In https://reviews.llvm.org/D51615#1226396, @xbolva00 wrote:
>
> > Bot sure how to fix tests since this is somehow hard to problematic.
>
>
> I think the fix for this is simply to not make the call to SetUseColor here. 
> Is there a reason for the call? It looks like the check for "dumb" terminal 
> and "GetIsTerminalWithColors" might have to come after setting the ANSI 
> escape codes if setting the codes impacts those two cases.


We may disable "use color" setting thanks to GetIsTerminalWithColors but then 
we realize that we can "enable it" via SetConsoleMode for newer Win 10, so we 
need to call it I think. The reverse order does not help us either.. I think.


Repository:
  rL LLVM

https://reviews.llvm.org/D51615



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


[Lldb-commits] [PATCH] D51615: Set Windows console mode to enable support for ansi escape codes

2018-09-06 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D51615#1226500, @stella.stamenova wrote:

> In https://reviews.llvm.org/D51615#1226494, @xbolva00 wrote:
>
> > In https://reviews.llvm.org/D51615#1226445, @stella.stamenova wrote:
> >
> > > In https://reviews.llvm.org/D51615#1226396, @xbolva00 wrote:
> > >
> > > > Bot sure how to fix tests since this is somehow hard to problematic.
> > >
> > >
> > > I think the fix for this is simply to not make the call to SetUseColor 
> > > here. Is there a reason for the call? It looks like the check for "dumb" 
> > > terminal and "GetIsTerminalWithColors" might have to come after setting 
> > > the ANSI escape codes if setting the codes impacts those two cases.
> >
> >
> > We may disable "use color" setting thanks to GetIsTerminalWithColors but 
> > then we realize that we can "enable it" via SetConsoleMode for newer Win 
> > 10, so we need to call it I think. The reverse order does not help us 
> > either.. I think.
>
>
> Sounds like GetIsTerminalWithColors might have to be updated to include the 
> new logic as well. Would you rather commit a fix or revert the change and 
> then commit a new one?


I can try to fix tomorrow with a new patch :)


Repository:
  rL LLVM

https://reviews.llvm.org/D51615



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


[Lldb-commits] [PATCH] D51772: Check if a terminal supports colors on Windows properly

2018-09-07 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added reviewers: stella.stamenova, zturner.
Herald added subscribers: lldb-commits, abidh.

Previously we SetUseColor(true) wrongly when output was not a terminal so it 
broken some (not public) bots.

Thanks for issue report, @stella.stamenova


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51772

Files:
  source/Core/Debugger.cpp
  source/Host/common/File.cpp


Index: source/Host/common/File.cpp
===
--- source/Host/common/File.cpp
+++ source/Host/common/File.cpp
@@ -806,6 +806,9 @@
 if (_isatty(fd)) {
   m_is_interactive = eLazyBoolYes;
   m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  m_supports_colors = eLazyBoolYes;
+#endif
 }
 #else
 if (isatty(fd)) {
Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 


Index: source/Host/common/File.cpp
===
--- source/Host/common/File.cpp
+++ source/Host/common/File.cpp
@@ -806,6 +806,9 @@
 if (_isatty(fd)) {
   m_is_interactive = eLazyBoolYes;
   m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  m_supports_colors = eLazyBoolYes;
+#endif
 }
 #else
 if (isatty(fd)) {
Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51772: Check if a terminal supports colors on Windows properly

2018-09-08 Thread Dávid Bolvanský via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB341746: Check if a terminal supports colors on Windows 
properly (authored by xbolva00, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D51772

Files:
  source/Core/Debugger.cpp
  source/Host/common/File.cpp


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 
Index: source/Host/common/File.cpp
===
--- source/Host/common/File.cpp
+++ source/Host/common/File.cpp
@@ -806,6 +806,9 @@
 if (_isatty(fd)) {
   m_is_interactive = eLazyBoolYes;
   m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  m_supports_colors = eLazyBoolYes;
+#endif
 }
 #else
 if (isatty(fd)) {


Index: source/Core/Debugger.cpp
===
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 
Index: source/Host/common/File.cpp
===
--- source/Host/common/File.cpp
+++ source/Host/common/File.cpp
@@ -806,6 +806,9 @@
 if (_isatty(fd)) {
   m_is_interactive = eLazyBoolYes;
   m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  m_supports_colors = eLazyBoolYes;
+#endif
 }
 #else
 if (isatty(fd)) {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51772: Check if a terminal supports colors on Windows properly

2018-09-08 Thread Dávid Bolvanský via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341746: Check if a terminal supports colors on Windows 
properly (authored by xbolva00, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D51772?vs=164359&id=164567#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D51772

Files:
  lldb/trunk/source/Core/Debugger.cpp
  lldb/trunk/source/Host/common/File.cpp


Index: lldb/trunk/source/Host/common/File.cpp
===
--- lldb/trunk/source/Host/common/File.cpp
+++ lldb/trunk/source/Host/common/File.cpp
@@ -806,6 +806,9 @@
 if (_isatty(fd)) {
   m_is_interactive = eLazyBoolYes;
   m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  m_supports_colors = eLazyBoolYes;
+#endif
 }
 #else
 if (isatty(fd)) {
Index: lldb/trunk/source/Core/Debugger.cpp
===
--- lldb/trunk/source/Core/Debugger.cpp
+++ lldb/trunk/source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 


Index: lldb/trunk/source/Host/common/File.cpp
===
--- lldb/trunk/source/Host/common/File.cpp
+++ lldb/trunk/source/Host/common/File.cpp
@@ -806,6 +806,9 @@
 if (_isatty(fd)) {
   m_is_interactive = eLazyBoolYes;
   m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+  m_supports_colors = eLazyBoolYes;
+#endif
 }
 #else
 if (isatty(fd)) {
Index: lldb/trunk/source/Core/Debugger.cpp
===
--- lldb/trunk/source/Core/Debugger.cpp
+++ lldb/trunk/source/Core/Debugger.cpp
@@ -812,7 +812,6 @@
   // Enabling use of ANSI color codes because LLDB is using them to highlight
   // text.
   llvm::sys::Process::UseANSIEscapeCodes(true);
-  SetUseColor(true);
 #endif
 }
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51966: Do not create new terminals when launching process on Windows by default

2018-09-12 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 created this revision.
xbolva00 added reviewers: teemperor, zturner.
Herald added subscribers: lldb-commits, abidh.

Unify behaviour across platforms. (We create new terminals only on Windows).

process launch offers explicit option:

  -t ( --tty )
   Start the process in a terminal (not supported on all platforms).

So we should open new terminals if-t is used.

Fixes PR38222


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51966

Files:
  source/Host/windows/ProcessLauncherWindows.cpp


Index: source/Host/windows/ProcessLauncherWindows.cpp
===
--- source/Host/windows/ProcessLauncherWindows.cpp
+++ source/Host/windows/ProcessLauncherWindows.cpp
@@ -72,7 +72,7 @@
 startupinfo.wShowWindow = SW_HIDE;
   }
 
-  DWORD flags = CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT;
+  DWORD flags = CREATE_UNICODE_ENVIRONMENT;
   if (launch_info.GetFlags().Test(eLaunchFlagDebug))
 flags |= DEBUG_ONLY_THIS_PROCESS;
 


Index: source/Host/windows/ProcessLauncherWindows.cpp
===
--- source/Host/windows/ProcessLauncherWindows.cpp
+++ source/Host/windows/ProcessLauncherWindows.cpp
@@ -72,7 +72,7 @@
 startupinfo.wShowWindow = SW_HIDE;
   }
 
-  DWORD flags = CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT;
+  DWORD flags = CREATE_UNICODE_ENVIRONMENT;
   if (launch_info.GetFlags().Test(eLaunchFlagDebug))
 flags |= DEBUG_ONLY_THIS_PROCESS;
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51966: Do not create new terminals when launching process on Windows by default

2018-09-12 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 abandoned this revision.
xbolva00 added a comment.

In https://reviews.llvm.org/D51966#1231533, @labath wrote:

> I think the issue here is that on windows we don't have the ability(*) to 
> pipe stdio through lldb, so if you create a process without a console, you 
> will not be able to use see it's output or pass it some input (probably fine 
> for gui apps, but bad for console ones). This means your approach will also 
> make things inconsistent with other platforms, only in a different way. (I 
> don't really have an opinion which one is better/worse.)
>
> (*) I think there is a way to emulate the unix pty behavior on windows, but 
> it is not exactly straight-forward. It involves creating a hidden console and 
> then polling that for changes/keypresses (I don't know the details, but 
> that's how someone once explained it to me).


Ok, thanks for info!


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51966



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


[Lldb-commits] [PATCH] D51966: Do not create new terminals when launching process on Windows by default

2018-09-12 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In https://reviews.llvm.org/D51966#1231943, @clayborg wrote:

> We should obey the --tty option here and set CREATE_NEW_CONSOLE if it is set 
> no?


I also thought about it.  @zturner, @labath ?


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51966



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


[Lldb-commits] [PATCH] D51966: Do not create new terminals when launching process on Windows by default

2018-09-12 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

So basically the hardest problem is to "find a way to get stdio from a process 
and feed to to LLDB so it shows up when neither --tty nor --no-stdio is set" ..


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51966



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


[Lldb-commits] [PATCH] D51966: Do not create new terminals when launching process on Windows with --no-stdio

2018-09-12 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 updated this revision to Diff 165103.
xbolva00 retitled this revision from "Do not create new terminals when 
launching process on Windows by default" to "Do not create new terminals when 
launching process on Windows with --no-stdio".
xbolva00 edited the summary of this revision.

https://reviews.llvm.org/D51966

Files:
  source/Host/windows/ProcessLauncherWindows.cpp


Index: source/Host/windows/ProcessLauncherWindows.cpp
===
--- source/Host/windows/ProcessLauncherWindows.cpp
+++ source/Host/windows/ProcessLauncherWindows.cpp
@@ -76,6 +76,9 @@
   if (launch_info.GetFlags().Test(eLaunchFlagDebug))
 flags |= DEBUG_ONLY_THIS_PROCESS;
 
+  if (launch_info.GetFlags().Test(eLaunchFlagDisableSTDIO))
+flags &= ~CREATE_NEW_CONSOLE;
+
   LPVOID env_block = nullptr;
   ::CreateEnvironmentBuffer(launch_info.GetEnvironment(), environment);
   if (!environment.empty())


Index: source/Host/windows/ProcessLauncherWindows.cpp
===
--- source/Host/windows/ProcessLauncherWindows.cpp
+++ source/Host/windows/ProcessLauncherWindows.cpp
@@ -76,6 +76,9 @@
   if (launch_info.GetFlags().Test(eLaunchFlagDebug))
 flags |= DEBUG_ONLY_THIS_PROCESS;
 
+  if (launch_info.GetFlags().Test(eLaunchFlagDisableSTDIO))
+flags &= ~CREATE_NEW_CONSOLE;
+
   LPVOID env_block = nullptr;
   ::CreateEnvironmentBuffer(launch_info.GetEnvironment(), environment);
   if (!environment.empty())
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D51966: Do not create new terminals when launching process on Windows with --no-stdio

2018-09-12 Thread Dávid Bolvanský via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB342075: Do not create new terminals when launching 
process on Windows with --no-stdio (authored by xbolva00, committed by ).

Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51966

Files:
  source/Host/windows/ProcessLauncherWindows.cpp


Index: source/Host/windows/ProcessLauncherWindows.cpp
===
--- source/Host/windows/ProcessLauncherWindows.cpp
+++ source/Host/windows/ProcessLauncherWindows.cpp
@@ -76,6 +76,9 @@
   if (launch_info.GetFlags().Test(eLaunchFlagDebug))
 flags |= DEBUG_ONLY_THIS_PROCESS;
 
+  if (launch_info.GetFlags().Test(eLaunchFlagDisableSTDIO))
+flags &= ~CREATE_NEW_CONSOLE;
+
   LPVOID env_block = nullptr;
   ::CreateEnvironmentBuffer(launch_info.GetEnvironment(), environment);
   if (!environment.empty())


Index: source/Host/windows/ProcessLauncherWindows.cpp
===
--- source/Host/windows/ProcessLauncherWindows.cpp
+++ source/Host/windows/ProcessLauncherWindows.cpp
@@ -76,6 +76,9 @@
   if (launch_info.GetFlags().Test(eLaunchFlagDebug))
 flags |= DEBUG_ONLY_THIS_PROCESS;
 
+  if (launch_info.GetFlags().Test(eLaunchFlagDisableSTDIO))
+flags &= ~CREATE_NEW_CONSOLE;
+
   LPVOID env_block = nullptr;
   ::CreateEnvironmentBuffer(launch_info.GetEnvironment(), environment);
   if (!environment.empty())
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D116351: Update Bug report URL to Github Issues

2022-01-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn:10
   output = "$target_gen_dir/config.h"
   values = [
+"BUG_REPORT_URL=https://github.com/llvm/llvm-project/issues/";,

This url should redirect to github - who maintains llvm website?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116351/new/

https://reviews.llvm.org/D116351

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


[Lldb-commits] [PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-11 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: llvm/docs/ReleaseNotes.rst:57
+
+* GCC >= 7.1
+* Clang >= 5.0

Do we have bots which uses last supported compiler versions? GCC 7.1, Clang 5.0 
and MSVC 16.7.

It is bad to promise something and then breakages here and there, for example: 
https://github.com/llvm/llvm-project/issues/57057 so probably no such bots.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

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


[Lldb-commits] [PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2022-03-28 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.
Herald added subscribers: pcwang-thead, luke957.
Herald added a project: All.

@mbenfield found false positive

  void test(void) {
static int counter = 0;
counter += 5;
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581

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


[Lldb-commits] [PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2022-03-28 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In D100581#3404624 , @xbolva00 wrote:

> @mbenfield found false positive
>
>   void test(void) {
> static int counter = 0;
> counter += 5;
>   }

posted https://reviews.llvm.org/D122374


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581

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


[Lldb-commits] [PATCH] D123957: Update the developer policy to mention release notes

2022-04-19 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

Can you please add link to RFC to commit message?

Otherwise looks good


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123957/new/

https://reviews.llvm.org/D123957

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


[Lldb-commits] [PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-05-21 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

>> Also fix a few places where this warning is correctly triggered.

Create new patch please - dont mix fixes with new warning within one patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581

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


[Lldb-commits] [PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In D100581#2792854 , @Abpostelnicu 
wrote:

> I think there is a false positive with this @george.burgess.iv:
> In this 
> 
>  we have the warning triggered: 
> mozglue/baseprofiler/core/platform-linux-android.cpp:216:9: error: variable 
> 'r' set but not used [-Werror,-Wunused-but-set-variable]
>
>   SigHandlerCoordinator() {
> PodZero(&mUContext);
> int r = sem_init(&mMessage2, /* pshared */ 0, 0);
> r |= sem_init(&mMessage3, /* pshared */ 0, 0);
> r |= sem_init(&mMessage4, /* pshared */ 0, 0);
> MOZ_ASSERT(r == 0);
>   }

If MOZ_ASSERT is expanded to nothing, than the warning is correct. (void)r; 
trick should work here..


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581

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


[Lldb-commits] [PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-04 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

In D100581#2798079 , @raj.khem wrote:

> http://sprunge.us/FJzZXL is a file from harfbuzz and it warns
>
>   a.cc:28670:32: error: variable 'supp_size' set but not used 
> [-Werror,-Wunused-but-set-variable]
>   unsigned int size0, size1, supp_size = 0;
>
> I do not have -Werror enabled but it still is reported as error. There is no 
> way to disable this warning ?

Well, you have

>> #pragma GCC diagnostic error "-Wunused"


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581

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


[Lldb-commits] [PATCH] D65409: [ProcessWindows] Choose a register context file by prepocessor

2019-07-29 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: Common/CMakeLists.txt:25
 # TODO add support for ARM (NT) and ARM64
-# TODO build these unconditionally as we cannot do cross-debugging or WoW
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
-  target_sources(lldbPluginProcessWindowsCommon PRIVATE
-x64/RegisterContextWindows_x64.cpp)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i?86|X86")
-  target_sources(lldbPluginProcessWindowsCommon PRIVATE
-x86/RegisterContextWindows_x86.cpp)
-endif()
+target_sources(lldbPluginProcessWindowsCommon PRIVATE
+  x64/RegisterContextWindows_x64.cpp)

Maybe add FIXME or TODO to revisit state of 
https://gitlab.kitware.com/cmake/cmake/issues/15170 ?


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65409/new/

https://reviews.llvm.org/D65409



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


[Lldb-commits] [PATCH] D65691: Various build fixes for lldb on MinGW

2019-08-03 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:19
 #endif
+#ifdef __MINGW32__
+// usleep

Maybe drop usleep and use C++’s

https://en.cppreference.com/w/cpp/thread/sleep_for ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65691/new/

https://reviews.llvm.org/D65691



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


[Lldb-commits] [PATCH] D84126: Enable -Wsuggest-override in the LLVM build

2020-07-19 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added a comment.

+1


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84126/new/

https://reviews.llvm.org/D84126



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


[Lldb-commits] [PATCH] D71857: Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Dávid Bolvanský via Phabricator via lldb-commits
xbolva00 added inline comments.



Comment at: 
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp:22
 
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/Log.h"

NFC patch?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71857/new/

https://reviews.llvm.org/D71857



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