[Lldb-commits] [lldb] r238623 - Leave OS type and vendor as unspecified unknowns.

2015-05-29 Thread Oleksiy Vyalov
Author: ovyalov
Date: Fri May 29 17:45:47 2015
New Revision: 238623

URL: http://llvm.org/viewvc/llvm-project?rev=238623&view=rev
Log:
Leave OS type and vendor as unspecified unknowns.

http://reviews.llvm.org/D10080


Modified:
lldb/trunk/source/Core/ArchSpec.cpp

Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=238623&r1=238622&r2=238623&view=diff
==
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Fri May 29 17:45:47 2015
@@ -861,7 +861,6 @@ ArchSpec::SetArchitecture (ArchitectureT
 if (arch_type == eArchTypeMachO)
 {
 m_triple.setVendor (llvm::Triple::Apple);
-
 switch (core_def->machine)
 {
 case llvm::Triple::aarch64:
@@ -886,11 +885,6 @@ ArchSpec::SetArchitecture (ArchitectureT
 break;
 }
 }
-else
-{
-m_triple.setVendor (llvm::Triple::UnknownVendor);
-m_triple.setOS (llvm::Triple::UnknownOS);
-}
 // Fall back onto setting the machine type if the arch by name 
failed...
 if (m_triple.getArch () == llvm::Triple::UnknownArch)
 m_triple.setArch (core_def->machine);


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


[Lldb-commits] [lldb] r238616 - XFAIL additional signal vs exception tests failing on FreeBSD

2015-05-29 Thread Ed Maste
Author: emaste
Date: Fri May 29 16:42:53 2015
New Revision: 238616

URL: http://llvm.org/viewvc/llvm-project?rev=238616&view=rev
Log:
XFAIL additional signal vs exception tests failing on FreeBSD

We need to apply to FreeBSD a change equivalent to r238549.

llvm.org/pr23699

Modified:
lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py

lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py

Modified: 
lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py?rev=238616&r1=238615&r2=238616&view=diff
==
--- lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py 
(original)
+++ lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py 
Fri May 29 16:42:53 2015
@@ -15,6 +15,7 @@ class CrashingInferiorTestCase(TestBase)
 self.buildDsym()
 self.inferior_crashing()
 
+@expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as 
exception, not signal")
 def test_inferior_crashing_dwarf(self):
 """Test that lldb reliably catches the inferior crashing (command)."""
 self.buildDwarf()

Modified: 
lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py?rev=238616&r1=238615&r2=238616&view=diff
==
--- 
lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
 (original)
+++ 
lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
 Fri May 29 16:42:53 2015
@@ -16,6 +16,7 @@ class CrashingRecursiveInferiorTestCase(
 self.buildDsym()
 self.recursive_inferior_crashing()
 
+@expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as 
exception, not signal")
 def test_recursive_inferior_crashing_dwarf(self):
 """Test that lldb reliably catches the inferior crashing (command)."""
 self.buildDwarf()

Modified: lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py?rev=238616&r1=238615&r2=238616&view=diff
==
--- lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py 
(original)
+++ lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py Fri 
May 29 16:42:53 2015
@@ -14,7 +14,7 @@ class HandleSegvTestCase(TestBase):
 
 @skipIfWindows # signals do not exist on Windows
 @skipIfDarwin
-@expectedFailureFreeBSD("llvm.org/23699 SIGSEGV is reported as exception, 
not signal")
+@expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as 
exception, not signal")
 def test_inferior_handle_sigsegv_with_dwarf(self):
 self.buildDefault()
 exe = os.path.join(os.getcwd(), "a.out")


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


[Lldb-commits] [lldb] r238615 - XFAIL TestHandleSegv on FreeBSD

2015-05-29 Thread Ed Maste
Author: emaste
Date: Fri May 29 16:34:12 2015
New Revision: 238615

URL: http://llvm.org/viewvc/llvm-project?rev=238615&view=rev
Log:
XFAIL TestHandleSegv on FreeBSD

We need to apply to FreeBSD a change equivalent to r238549.

llvm.org/pr23699

Modified:
lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py

Modified: lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py?rev=238615&r1=238614&r2=238615&view=diff
==
--- lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py 
(original)
+++ lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py Fri 
May 29 16:34:12 2015
@@ -14,6 +14,7 @@ class HandleSegvTestCase(TestBase):
 
 @skipIfWindows # signals do not exist on Windows
 @skipIfDarwin
+@expectedFailureFreeBSD("llvm.org/23699 SIGSEGV is reported as exception, 
not signal")
 def test_inferior_handle_sigsegv_with_dwarf(self):
 self.buildDefault()
 exe = os.path.join(os.getcwd(), "a.out")


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


[Lldb-commits] [lldb] r238605 - Working directory FileSpec should use remote path syntax to display correctly.

2015-05-29 Thread Chaoren Lin
Author: chaoren
Date: Fri May 29 14:52:37 2015
New Revision: 238605

URL: http://llvm.org/viewvc/llvm-project?rev=238605&view=rev
Log:
Working directory FileSpec should use remote path syntax to display correctly.

Summary: Depends on D9728.

Reviewers: ovyalov, zturner, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9806

Modified:
lldb/trunk/include/lldb/Host/FileSpec.h
lldb/trunk/source/Host/common/FileSpec.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Modified: lldb/trunk/include/lldb/Host/FileSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/FileSpec.h?rev=238605&r1=238604&r2=238605&view=diff
==
--- lldb/trunk/include/lldb/Host/FileSpec.h (original)
+++ lldb/trunk/include/lldb/Host/FileSpec.h Fri May 29 14:52:37 2015
@@ -669,8 +669,14 @@ public:
 SetFile (const char *path, bool resolve_path, PathSyntax syntax = 
ePathSyntaxHostNative);
 
 void
+SetFile(const char *path, bool resolve_path, ArchSpec arch);
+
+void
 SetFile(const std::string &path, bool resolve_path, PathSyntax syntax = 
ePathSyntaxHostNative);
 
+void
+SetFile(const std::string &path, bool resolve_path, ArchSpec arch);
+
 bool
 IsResolved () const
 {

Modified: lldb/trunk/source/Host/common/FileSpec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSpec.cpp?rev=238605&r1=238604&r2=238605&view=diff
==
--- lldb/trunk/source/Host/common/FileSpec.cpp (original)
+++ lldb/trunk/source/Host/common/FileSpec.cpp Fri May 29 14:52:37 2015
@@ -345,11 +345,26 @@ FileSpec::SetFile (const char *pathname,
 }
 
 void
+FileSpec::SetFile(const char *pathname, bool resolve, ArchSpec arch)
+{
+return SetFile(pathname, resolve,
+arch.GetTriple().isOSWindows()
+? ePathSyntaxWindows
+: ePathSyntaxPosix);
+}
+
+void
 FileSpec::SetFile(const std::string &pathname, bool resolve, PathSyntax syntax)
 {
 return SetFile(pathname.c_str(), resolve, syntax);
 }
 
+void
+FileSpec::SetFile(const std::string &pathname, bool resolve, ArchSpec arch)
+{
+return SetFile(pathname.c_str(), resolve, arch);
+}
+
 //--
 // Convert to pointer operator. This allows code to check any FileSpec
 // objects to see if they contain anything valid using code such as:

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=238605&r1=238604&r2=238605&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
Fri May 29 14:52:37 2015
@@ -2301,7 +2301,7 @@ GDBRemoteCommunicationClient::GetWorking
 return false;
 std::string cwd;
 response.GetHexByteString(cwd);
-working_dir.SetFile(cwd, false);
+working_dir.SetFile(cwd, false, GetHostArchitecture());
 return !cwd.empty();
 }
 return false;


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


[Lldb-commits] [lldb] r238603 - Improve test for g++ 4.6

2015-05-29 Thread Ed Maste
Author: emaste
Date: Fri May 29 14:52:02 2015
New Revision: 238603

URL: http://llvm.org/viewvc/llvm-project?rev=238603&view=rev
Log:
Improve test for g++ 4.6

Skip the g++ 4.6 test if we're not going to build any C++ source.
If a test has C++ source files we automatically determine which C++
compiler to use based on $CC (for example, clang++ if CC=clang).
However, this is not done for tests without C++ source and CXX will
be GNU make's default of g++.  This produces suprious "g++: not found"
errors in testrun output on systems without a gcc/g++.

Differential Revision:  http://reviews.llvm.org/D10122

Modified:
lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/test/make/Makefile.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=238603&r1=238602&r2=238603&view=diff
==
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Fri May 29 14:52:02 2015
@@ -342,14 +342,16 @@ endif
 #--
 # Check if we are compiling with gcc 4.6
 #--
-ifneq (,$(filter g++,$(CXX)))
-   CXXVERSION = $(shell g++ -dumpversion | cut -b 1-3)
+ifneq "$(strip $(CXX_SOURCES) $(OBJCXX_SOURCES))" ""
+ifneq "$(filter g++,$(CXX))" ""
+   CXXVERSION = $(shell $(CXX) -dumpversion | cut -b 1-3)
ifeq "$(CXXVERSION)" "4.6"
 # GCC 4.6 cannot handle -std=c++11, so replace it with 
-std=c++0x
 # instead. FIXME: remove once GCC version is upgraded.
override CXXFLAGS := $(subst -std=c++11,-std=c++0x,$(CXXFLAGS))
endif
 endif
+endif
 
 #--
 # DYLIB_ONLY variable can be used to skip the building of a.out.


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


[Lldb-commits] [lldb] r238600 - TestHandleSegv: also assert that we have a thread

2015-05-29 Thread Ed Maste
Author: emaste
Date: Fri May 29 14:38:41 2015
New Revision: 238600

URL: http://llvm.org/viewvc/llvm-project?rev=238600&view=rev
Log:
TestHandleSegv: also assert that we have a thread

If get_stopped_thread(... eStopReasonSignal) returns no thread, the
thread.IsValid assertion would throw AttributeError: 'NoneType' object
has no attribute 'IsValid'.

Differential Revision:  http://reviews.llvm.org/D10123

Modified:
lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py

Modified: lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py?rev=238600&r1=238599&r2=238600&view=diff
==
--- lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py 
(original)
+++ lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py Fri 
May 29 14:38:41 2015
@@ -29,7 +29,7 @@ class HandleSegvTestCase(TestBase):
 signo = process.GetUnixSignals().GetSignalNumberFromName("SIGSEGV")
 
 thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-self.assertTrue(thread.IsValid(), "Thread should be stopped due to a 
signal")
+self.assertTrue(thread and thread.IsValid(), "Thread should be stopped 
due to a signal")
 self.assertTrue(thread.GetStopReasonDataCount() >= 1, "There was data 
in the event.")
 self.assertEqual(thread.GetStopReasonDataAtIndex(0), signo, "The stop 
signal was SIGSEGV")
 


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


[Lldb-commits] [lldb] r238599 - Implement snprintf for MSVC with correct return value.

2015-05-29 Thread Chaoren Lin
Author: chaoren
Date: Fri May 29 14:34:57 2015
New Revision: 238599

URL: http://llvm.org/viewvc/llvm-project?rev=238599&view=rev
Log:
Implement snprintf for MSVC with correct return value.

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10048

Modified:
lldb/trunk/include/lldb/Host/windows/win32.h
lldb/trunk/source/Host/windows/Windows.cpp

Modified: lldb/trunk/include/lldb/Host/windows/win32.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/windows/win32.h?rev=238599&r1=238598&r2=238599&view=diff
==
--- lldb/trunk/include/lldb/Host/windows/win32.h (original)
+++ lldb/trunk/include/lldb/Host/windows/win32.h Fri May 29 14:34:57 2015
@@ -52,7 +52,7 @@ typedef unsigned short mode_t;
 
 #ifdef LLDB_DISABLE_PYTHON
 typedef uint32_t pid_t;
-#endif
+#endif // LLDB_DISABLE_PYTHON
 
 int usleep(uint32_t useconds);
 
@@ -63,6 +63,7 @@ char *dirname(char *path);
 
 int strcasecmp(const char* s1, const char* s2);
 int strncasecmp(const char* s1, const char* s2, size_t n);
+int snprintf(char *buffer, size_t count, const char *format, ...);
 
 #define STDIN_FILENO  0
 #define STDOUT_FILENO 1
@@ -73,8 +74,7 @@ int strncasecmp(const char* s1, const ch
 #define S_IFDIR  _S_IFDIR
 #define S_ISDIR(mode)  (((mode) & S_IFMT) == S_IFDIR)
 
-#define snprintf _snprintf
-#endif
+#endif // _MSC_VER
 
 // timespec
 struct timespec

Modified: lldb/trunk/source/Host/windows/Windows.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Windows.cpp?rev=238599&r1=238598&r2=238599&view=diff
==
--- lldb/trunk/source/Host/windows/Windows.cpp (original)
+++ lldb/trunk/source/Host/windows/Windows.cpp Fri May 29 14:34:57 2015
@@ -198,8 +198,33 @@ int strncasecmp(const char* s1, const ch
 
 int usleep(uint32_t useconds)
 {
-   Sleep(useconds / 1000);
-   return 0;
+Sleep(useconds / 1000);
+return 0;
+}
+
+int snprintf(char *buffer, size_t count, const char *format, ...)
+{
+int old_errno = errno;
+va_list argptr;
+va_start(argptr, format);
+int r = vsnprintf(buffer, count, format, argptr);
+int new_errno = errno;
+buffer[count-1] = '\0';
+if (r == -1 || r == count)
+{
+FILE *nul = fopen("nul", "w");
+int bytes_written = vfprintf(nul, format, argptr);
+fclose(nul);
+if (bytes_written < count)
+errno = new_errno;
+else
+{
+errno = old_errno;
+r = bytes_written;
+}
+}
+va_end(argptr);
+return r;
 }
 
 #endif // _MSC_VER


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


[Lldb-commits] [lldb] r238594 - Fix hanging test suite when dosep.py is invoked directly.

2015-05-29 Thread Chaoren Lin
Author: chaoren
Date: Fri May 29 13:43:46 2015
New Revision: 238594

URL: http://llvm.org/viewvc/llvm-project?rev=238594&view=rev
Log:
Fix hanging test suite when dosep.py is invoked directly.

Reviewers: zturner, sivachandra

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10134

Modified:
lldb/trunk/test/dosep.py

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=238594&r1=238593&r2=238594&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Fri May 29 13:43:46 2015
@@ -92,9 +92,14 @@ def call_with_timeout(command, timeout):
 command = [timeout_command, '-s', 'QUIT', timeout] + command
 # Specifying a value for close_fds is unsupported on Windows when using 
subprocess.PIPE
 if os.name != "nt":
-process = subprocess.Popen(command, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE, close_fds=True)
+process = subprocess.Popen(command, stdin=subprocess.PIPE,
+stdout=subprocess.PIPE,
+stderr=subprocess.PIPE,
+close_fds=True)
 else:
-process = subprocess.Popen(command, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)
+process = subprocess.Popen(command, stdin=subprocess.PIPE,
+stdout=subprocess.PIPE,
+stderr=subprocess.PIPE)
 output = process.communicate()
 exit_status = process.returncode
 passes, failures = parse_test_results(output)


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


[Lldb-commits] [lldb] r238595 - Add '+' sign at the end of echo message for debugserver

2015-05-29 Thread Ying Chen
Author: chying
Date: Fri May 29 13:44:08 2015
New Revision: 238595

URL: http://llvm.org/viewvc/llvm-project?rev=238595&view=rev
Log:
Add '+' sign at the end of echo message for debugserver

Summary:
-ammend to r238538
-Fix test failure of TestGdbRemoteAuxvSupport.py and TestLldbGdbServer.py on 
MacOSX

Test Plan:
./dotest -p TestGdbRemoteAuxvSupport.py
./dotest -p TestLldbGdbServer.py

Reviewers: chaoren, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10133

Modified:
lldb/trunk/tools/debugserver/source/RNBRemote.cpp

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=238595&r1=238594&r2=238595&view=diff
==
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Fri May 29 13:44:08 2015
@@ -3097,7 +3097,7 @@ RNBRemote::HandlePacket_qSupported (cons
 {
 uint32_t max_packet_size = 128 * 1024;  // 128KBytes is a reasonable max 
packet size--debugger can always use less
 char buf[64];
-snprintf (buf, sizeof(buf), "qXfer:features:read+;PacketSize=%x;qEcho", 
max_packet_size);
+snprintf (buf, sizeof(buf), "qXfer:features:read+;PacketSize=%x;qEcho+", 
max_packet_size);
 return SendPacket (buf);
 }
 


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


[Lldb-commits] [lldb] r238590 - Unbreak mac build.

2015-05-29 Thread Greg Clayton
Author: gclayton
Date: Fri May 29 13:28:01 2015
New Revision: 238590

URL: http://llvm.org/viewvc/llvm-project?rev=238590&view=rev
Log:
Unbreak mac build.


Modified:
lldb/trunk/source/Interpreter/PythonDataObjects.cpp

Modified: lldb/trunk/source/Interpreter/PythonDataObjects.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/PythonDataObjects.cpp?rev=238590&r1=238589&r2=238590&view=diff
==
--- lldb/trunk/source/Interpreter/PythonDataObjects.cpp (original)
+++ lldb/trunk/source/Interpreter/PythonDataObjects.cpp Fri May 29 13:28:01 2015
@@ -15,6 +15,8 @@
 
 #else
 
+#include "lldb/lldb-python.h"
+
 #include 
 
 #include "lldb/Core/Stream.h"


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


[Lldb-commits] [lldb] r238587 - Re-add #include "lldb-python.h" back in two places.

2015-05-29 Thread Zachary Turner
Author: zturner
Date: Fri May 29 13:18:26 2015
New Revision: 238587

URL: http://llvm.org/viewvc/llvm-project?rev=238587&view=rev
Log:
Re-add #include "lldb-python.h" back in two places.

Fixing these two instances will require some work, so for now
I'm adding these 2 includes back to get the build working.

Modified:
lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
lldb/trunk/source/Host/posix/HostInfoPosix.cpp

Modified: lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm?rev=238587&r1=238586&r2=238587&view=diff
==
--- lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm (original)
+++ lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm Fri May 29 13:18:26 2015
@@ -7,6 +7,8 @@
 //
 
//===--===//
 
+#include "lldb/lldb-python.h"
+
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/macosx/HostInfoMacOSX.h"
 #include "lldb/Interpreter/Args.h"

Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=238587&r1=238586&r2=238587&view=diff
==
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Fri May 29 13:18:26 2015
@@ -7,6 +7,7 @@
 //
 
//===--===//
 
+#include "lldb/lldb-python.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Host/posix/HostInfoPosix.h"
 


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


Re: [Lldb-commits] [PATCH] Improve test for g++ 4.6

2015-05-29 Thread Vince Harron
Debugging apps built with gcc 4.6 might be important to someone.  No reason
to pull it out if it's not hurting.
On May 29, 2015 10:15 AM, "Chaoren Lin"  wrote:

> I support that idea, but we should probably consult Greg as well.
> On May 29, 2015 10:11, "Ed Maste"  wrote:
>
>> Or, perhaps we can just remove this check / c++0x workaround altogether
>> now? Since LLVM/Clang/LLDB requires a C++11 compiler to build, we know the
>> user has one they can use.
>>
>>
>> http://reviews.llvm.org/D10122
>> 
>>
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/
>> 
>>
>>
>>
> ___
> lldb-commits mailing list
> lldb-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
>
___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r238572 - Improve handling of print value argument in -stack-list-* commands.

2015-05-29 Thread Hafiz Abid Qadeer
Author: abidh
Date: Fri May 29 11:48:40 2015
New Revision: 238572

URL: http://llvm.org/viewvc/llvm-project?rev=238572&view=rev
Log:
Improve handling of print value argument in -stack-list-* commands.

It was reviewed in http://reviews.llvm.org/D10106.
Patch by paulmaybee.


Modified:
lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp

Modified: lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py?rev=238572&r1=238571&r2=238572&view=diff
==
--- lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py (original)
+++ lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py Fri May 29 11:48:40 2015
@@ -48,9 +48,9 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 # Test that -stack-list-arguments lists stack arguments with simple 
values
 self.runCmd("-stack-list-arguments 2 0 1")
-
self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}")
+
self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",type=\"int\",value=\"1\"},{name=\"argv\",type=\"const
 char \*\*\",value=\".*\"}\]}")
 self.runCmd("-stack-list-arguments --simple-values 0 1")
-
self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}")
+
self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",type=\"int\",value=\"1\"},{name=\"argv\",type=\"const
 char \*\*\",value=\".*\"}\]}")
 
 # Test that an invalid low-frame is handled 
 # FIXME: -1 is treated as unsigned int
@@ -114,9 +114,9 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 # Test -stack-list-locals: use 2 or --simple-values
 self.runCmd("-stack-list-locals 2")
-
self.expect("\^done,locals=\[{name=\"a\",value=\"10\"},{name=\"b\",value=\"20\"}\]")
+
self.expect("\^done,locals=\[{name=\"a\",type=\"int\",value=\"10\"},{name=\"b\",type=\"int\",value=\"20\"}\]")
 self.runCmd("-stack-list-locals --simple-values")
-
self.expect("\^done,locals=\[{name=\"a\",value=\"10\"},{name=\"b\",value=\"20\"}\]")
+
self.expect("\^done,locals=\[{name=\"a\",type=\"int\",value=\"10\"},{name=\"b\",type=\"int\",value=\"20\"}\]")
 
 # Test struct local variable:
 # Run to BP_local_struct_test
@@ -141,9 +141,9 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 # Test -stack-list-locals: use 2 or --simple-values
 self.runCmd("-stack-list-locals 2")
-self.expect("\^done,locals=\[name=\"var_c\"\]")
+self.expect("\^done,locals=\[{name=\"var_c\",type=\"my_type\"}\]")
 self.runCmd("-stack-list-locals --simple-values")
-self.expect("\^done,locals=\[name=\"var_c\"\]")
+self.expect("\^done,locals=\[{name=\"var_c\",type=\"my_type\"}\]")
 
 # Test array local variable:
 # Run to BP_local_array_test
@@ -168,9 +168,9 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 # Test -stack-list-locals: use 2 or --simple-values
 self.runCmd("-stack-list-locals 2")
-self.expect("\^done,locals=\[name=\"array\"\]")
+self.expect("\^done,locals=\[{name=\"array\",type=\"int \[3\]\"}\]")
 self.runCmd("-stack-list-locals --simple-values")
-self.expect("\^done,locals=\[name=\"array\"\]")
+self.expect("\^done,locals=\[{name=\"array\",type=\"int \[3\]\"}\]")
 
 # Test pointers as local variable:
 # Run to BP_local_pointer_test
@@ -195,9 +195,9 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 # Test -stack-list-locals: use 2 or --simple-values
 self.runCmd("-stack-list-locals 2")
-
self.expect("\^done,locals=\[{name=\"test_str\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",value=\"24\"},{name=\"ptr\",value=\".*?\"}\]")
+self.expect("\^done,locals=\[{name=\"test_str\",type=\"const char 
\*\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",type=\"int\",value=\"24\"},{name=\"ptr\",type=\"int
 \*\",value=\".*?\"}\]")
 self.runCmd("-stack-list-locals --simple-values")
-
self.expect("\^done,locals=\[{name=\"test_str\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",value=\"24\"},{name=\"ptr\",value=\".*?\"}\]")
+self.expect("\^done,locals=\[{name=\"test_str\",type=\"const char 
\*\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",type=\"int\",value=\"24\"},{name=\"ptr\",type=\"int
 \*\",value=\".*?\"}\]")
 
 @lldbmi_test
 @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for 
windows")
@@ -241,9 +241,9 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 # Test -stack-list-variables: use 2 or --simple-values
 self.runCmd("-stack-list-variables 2")
-
self.expect("\^done,variables=\[{arg=\"1\",name=\"c\",value=\"30\"}

Re: [Lldb-commits] [PATCH] Add type result to lldb-mi variables lists when simple-values is specified.

2015-05-29 Thread Paul Maybee
I am new and can't commit directly. Can you commit this for me?

-Original Message-
From: Hafiz Abid Qadeer [mailto:abidh@gmail.com] 
Sent: Friday, May 29, 2015 9:16 AM
To: Paul Maybee; ki.s...@gmail.com; Chuck Ries; abidh@gmail.com
Cc: lldb-commits@cs.uiuc.edu
Subject: Re: [PATCH] Add type result to lldb-mi variables lists when 
simple-values is specified.

Sometime types can have slight difference across platforms. Make sure it does 
not cause test failure somewhere. Otherwise looks ok. Please go ahead and 
commit.


http://reviews.llvm.org/D10106

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



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


Re: [Lldb-commits] [PATCH] Add type result to lldb-mi variables lists when simple-values is specified.

2015-05-29 Thread Paul Maybee
Sorry, I mistyped the comment in the review. My fix "does not" have the issue 
the Ilia raised. That is, it does return names in simple lists when no values 
are asked for. 

-Original Message-
From: Hafiz Abid Qadeer [mailto:abidh@gmail.com] 
Sent: Friday, May 29, 2015 8:25 AM
To: Paul Maybee; ki.s...@gmail.com; Chuck Ries; abidh@gmail.com
Cc: lldb-commits@cs.uiuc.edu
Subject: Re: [PATCH] Add type result to lldb-mi variables lists when 
simple-values is specified.

In http://reviews.llvm.org/D10106#180919, @paulmaybee wrote:

> Hi Abid,
>  Yeah looks like you are solving the same problem. I didn't see your review 
> in progress.  I do, however, believe my patch also fixes both the issues you 
> address with yours, and does have the issue that Ilia raises.
> -Paul


If you can modify your patch so that it addresses the 2nd issue as Ilia wants 
then it is ok for me. Please see the bugzilla entry that is mentioned in my 
revision for more details. Otherwise you can wait for me to get around to 
fixing it.

Thanks,
Abid


http://reviews.llvm.org/D10106

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



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


[Lldb-commits] [lldb] r238549 - Report inferior SIGSEGV as a signal instead of an exception on linux

2015-05-29 Thread Pavel Labath
Author: labath
Date: Fri May 29 05:13:03 2015
New Revision: 238549

URL: http://llvm.org/viewvc/llvm-project?rev=238549&view=rev
Log:
Report inferior SIGSEGV as a signal instead of an exception on linux

Summary:
Previously, we reported inferior receiving SIGSEGV (or SIGILL, SIGFPE, SIGBUS) 
as an "exception"
to LLDB, presumably to match OSX behaviour. Beside the fact that we were 
basically lying to the
user, this was also causing problems with inferiors which handle SIGSEGV by 
themselves, since
LLDB was unable to reinject this signal back into the inferior.

This commit changes LLGS to report SIGSEGV as a signal. This has necessitated 
some changes in the
test-suite, which had previously used eStopReasonException to locate threads 
that crashed. Now it
uses platform-specific logic, which in the case of linux searches for 
eStopReasonSignaled with
signal=SIGSEGV.

I have also added the ability to set the description of StopInfoUnixSignal 
using the description
field of the gdb-remote packet. The linux stub uses this to display additional 
information about
the segfault (invalid address, address access protected, etc.).

Test Plan: All tests pass on linux and osx.

Reviewers: ovyalov, clayborg, emaste

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D10057

Added:
lldb/trunk/test/functionalities/signal/handle-segv/
lldb/trunk/test/functionalities/signal/handle-segv/Makefile
lldb/trunk/test/functionalities/signal/handle-segv/TestHandleSegv.py
lldb/trunk/test/functionalities/signal/handle-segv/main.c
Modified:
lldb/trunk/include/lldb/Target/StopInfo.h
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.h
lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Target/StopInfo.cpp
lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py

lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py

lldb/trunk/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py
lldb/trunk/test/lldbutil.py

Modified: lldb/trunk/include/lldb/Target/StopInfo.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StopInfo.h?rev=238549&r1=238548&r2=238549&view=diff
==
--- lldb/trunk/include/lldb/Target/StopInfo.h (original)
+++ lldb/trunk/include/lldb/Target/StopInfo.h Fri May 29 05:13:03 2015
@@ -164,7 +164,7 @@ public:
 CreateStopReasonWithWatchpointID (Thread &thread, lldb::break_id_t 
watch_id);
 
 static lldb::StopInfoSP
-CreateStopReasonWithSignal (Thread &thread, int signo);
+CreateStopReasonWithSignal (Thread &thread, int signo, const char 
*description = nullptr);
 
 static lldb::StopInfoSP
 CreateStopReasonToTrace (Thread &thread);

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=238549&r1=238548&r2=238549&view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Fri May 29 
05:13:03 2015
@@ -2177,7 +2177,7 @@ NativeProcessLinux::MonitorSignal(const
 // leave the signal intact if this is the thread that was 
chosen as the
 // triggering thread.
 if (m_pending_notification_up && 
m_pending_notification_up->triggering_tid == pid)
-linux_thread_sp->SetStoppedBySignal(SIGSTOP);
+linux_thread_sp->SetStoppedBySignal(SIGSTOP, info);
 else
 linux_thread_sp->SetStoppedBySignal(0);
 
@@ -2217,22 +2217,8 @@ NativeProcessLinux::MonitorSignal(const
 // This thread is stopped.
 ThreadDidStop (pid, false);
 
-switch (signo)
-{
-case SIGSEGV:
-case SIGILL:
-case SIGFPE:
-case SIGBUS:
-if (thread_sp)
-std::static_pointer_cast 
(thread_sp)->SetCrashedWithException (*info);
-break;
-default:
-// This is just a pre-signal-delivery notification of the incoming 
signal.
-if (thread_sp)
-std::static_pointer_cast 
(thread_sp)->SetStoppedBySignal (signo);
-
-break;
-}
+if (thread_sp)
+std::static_pointer_cast 
(thread_sp)->SetStoppedBySignal(signo, info);
 
 // Send a stop to the debugger after we get all other threads to stop.
 StopRunningThreads (pid);

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
URL: 
http: