Re: [Lldb-commits] [PATCH] D17131: [LLDB][MIPS] Fix TestInferiorAssert.py for MIPS
nitesh.jain marked an inline comment as done. nitesh.jain added a comment. Thanks zturner. Will update the diff as per suggestion. Repository: rL LLVM http://reviews.llvm.org/D17131 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17131: [LLDB][MIPS] Fix TestInferiorAssert.py for MIPS
nitesh.jain updated this revision to Diff 47776. nitesh.jain added a comment. Update the diff as per suggestion. Repository: rL LLVM http://reviews.llvm.org/D17131 Files: packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py Index: packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py === --- packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py +++ packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py @@ -17,6 +17,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting(self): """Test that lldb reliably catches the inferior asserting (command).""" self.build() @@ -31,6 +32,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting_disassemble(self): """Test that lldb reliably disassembles frames after asserting (command).""" self.build() @@ -45,6 +47,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting_expr(self): """Test that the lldb expression interpreter can read from the inferior after asserting (command).""" self.build() @@ -52,6 +55,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting_step(self): """Test that lldb functions correctly after stepping through a call to assert().""" self.build() Index: packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py === --- packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py +++ packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py @@ -17,6 +17,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting(self): """Test that lldb reliably catches the inferior asserting (command).""" self.build() @@ -31,6 +32,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting_disassemble(self): """Test that lldb reliably disassembles frames after asserting (command).""" self.build() @@ -45,6 +47,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting_expr(self): """Test that the lldb expression interpreter can read from the inferior after asserting (command).""" self.build() @@ -52,6 +55,7 @@ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows") @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm']) +@expectedFailureAll(bugnumber="llvm.org/pr26592", triple = '^mips') def test_inferior_asserting_step(self): """Test that lldb functions correctly after stepping through a call to assert().""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17099: Add reverse-connect functionality to the gdb-remote command
labath added a comment. I like this more, but I'd like to take it a bit further. I think we won't have to parse the url string at all (see comments). I believe the best way to avoid breaking (and being broken by) other changes is to make sure this fits in nicely in the existing architecture. Putting this logic into `ConnectToDebugServer` seems like the logical place. You can wait with the test until we have settled on the final implementation, but I'd like the test to go in together with the change. Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:726 @@ -725,2 +725,3 @@ -error = ConnectToDebugserver (remote_url); +if (strncmp(remote_url, "listen", strlen("listen")) == 0) +{ If we can get `ConnectToDebugserver` working with a listen url then we will get rid of this url parsing hack... Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:1088 @@ -1069,3 +1087,3 @@ { if (conn_ap->Connect(connect_url, &error) == eConnectionStatusSuccess) { `ConnectionFileDescriptor::Connect` seems to be able to handle `listen://` urls. What would happen if you just passed the listen url to `ConnectToDebugserver` http://reviews.llvm.org/D17099 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17088: Add target and host platform enums so we're not using strings everywhere
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. looks good. http://reviews.llvm.org/D17088 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17182: Adjust for Python-3.
labath accepted this revision. This revision is now accepted and ready to land. Comment at: scripts/Python/modules/readline/readline.cpp:55 @@ -39,1 +54,3 @@ static char* +#if PY_VERSION_HEX >= 0x0300 +simple_readline(FILE *stdin, FILE *stdout, const char *prompt) existing code uses `PY_MAJOR_VERSION >= 3` (which also looks much nicer), so let's be consistent. Comment at: source/API/liblldb.exports:4 @@ -3,1 +3,2 @@ init_lld* +PyInit__lld* zturner wrote: > I don't really know what the syntax of this file is, but the symbol is called > `PyInit__lldb`, not `PyInit__lld`. Is this still correct? Does it matter > that you're exporting both the Python 2 and the Python 3 symbol in both > versions even when they're not defined? This just restricts the exported symbols to the ones matching the wildcards, so I don't think it matters that both are present. OTOH, unless we know the reason why the `b` has to be omitted from the wildcard, then I suggest you add it. http://reviews.llvm.org/D17182 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17106: Fix SocketTest on Windows
labath added a subscriber: labath. labath accepted this revision. labath added a reviewer: labath. labath added a comment. This revision is now accepted and ready to land. We are not running these unittests on windows at the moment. You are the windows maintainer, so if you say this is working for you then remove it. We can always fix things up later... http://reviews.llvm.org/D17106 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17099: Add reverse-connect functionality to the gdb-remote command
fjricci added a comment. It looks like passing a `listen://` url to `ConnectToDebugserver` actually works "out of the box". Thanks! I'll work on writing a unit test. http://reviews.llvm.org/D17099 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17099: Add reverse-connect functionality to the gdb-remote command
fjricci updated this revision to Diff 47806. fjricci added a comment. Remove unnecessary special-case logic for reverse connecting http://reviews.llvm.org/D17099 Files: source/Interpreter/CommandInterpreter.cpp Index: source/Interpreter/CommandInterpreter.cpp === --- source/Interpreter/CommandInterpreter.cpp +++ source/Interpreter/CommandInterpreter.cpp @@ -624,18 +624,21 @@ } } -std::unique_ptr -connect_gdb_remote_cmd_ap(new CommandObjectRegexCommand (*this, - "gdb-remote", - "Connect to a remote GDB server. If no hostname is provided, localhost is assumed.", - "gdb-remote [:]", - 2, - 0, - false)); +std::unique_ptr connect_gdb_remote_cmd_ap( +new CommandObjectRegexCommand(*this, "gdb-remote", "Connect to a remote GDB server. If no " + "hostname is provided, localhost is assumed.", + "gdb-remote [:] [reverse]", 2, 0, false)); if (connect_gdb_remote_cmd_ap.get()) { -if (connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", "process connect --plugin gdb-remote connect://%1") && -connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+)$", "process connect --plugin gdb-remote connect://localhost:%1")) +if (connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", + "process connect --plugin gdb-remote connect://%1") && +connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+)$", + "process connect --plugin gdb-remote connect://localhost:%1") && +connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+) reverse$", + "process connect --plugin gdb-remote listen://%1") && +connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+) reverse$", + "process connect --plugin gdb-remote " + "listen://localhost:%1")) { CommandObjectSP command_sp(connect_gdb_remote_cmd_ap.release()); m_command_dict[command_sp->GetCommandName ()] = command_sp; Index: source/Interpreter/CommandInterpreter.cpp === --- source/Interpreter/CommandInterpreter.cpp +++ source/Interpreter/CommandInterpreter.cpp @@ -624,18 +624,21 @@ } } -std::unique_ptr -connect_gdb_remote_cmd_ap(new CommandObjectRegexCommand (*this, - "gdb-remote", - "Connect to a remote GDB server. If no hostname is provided, localhost is assumed.", - "gdb-remote [:]", - 2, - 0, - false)); +std::unique_ptr connect_gdb_remote_cmd_ap( +new CommandObjectRegexCommand(*this, "gdb-remote", "Connect to a remote GDB server. If no " + "hostname is provided, localhost is assumed.", + "gdb-remote [:] [reverse]", 2, 0, false)); if (connect_gdb_remote_cmd_ap.get()) { -if (connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", "process connect --plugin gdb-remote connect://%1") && -connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+)$", "process connect --plugin gdb-remote connect://localhost:%1")) +if (connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+)$", + "process connect --plugin gdb-remote connect://%1") && +connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+)$", + "process connect --plugin gdb-remote connect://localhost:%1") && +connect_gdb_remote_cmd_ap->AddRegexCommand("^([^:]+:[[:digit:]]+) reverse$", + "process connect --plugin gdb-remote listen://%1") && +connect_gdb_remote_cmd_ap->AddRegexCommand("^([[:digit:]]+) reverse$", +
Re: [Lldb-commits] [PATCH] D17131: [LLDB][MIPS] Fix TestInferiorAssert.py for MIPS
ovyalov accepted this revision. ovyalov added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM http://reviews.llvm.org/D17131 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] LLVM buildmaster will be updated and restarted tonight
Hello everyone, LLVM buildmaster will be updated and restarted after 6 PM Pacific time today. Thanks Galina ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260699 - Renamed TestRdar12991846 to the more descriptive TestUnicodeLiterals.
Author: spyffe Date: Fri Feb 12 12:42:00 2016 New Revision: 260699 URL: http://llvm.org/viewvc/llvm-project?rev=260699&view=rev Log: Renamed TestRdar12991846 to the more descriptive TestUnicodeLiterals. Test cases should not be named after PR or Radar numbers. It's fine to annotate them with these numbers in comments, however. Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/ - copied from r260638, lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rdar12991846/ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py - copied, changed from r260638, lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rdar12991846/TestRdar12991846.py Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rdar12991846/ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestRdar12991846.py Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestRdar12991846.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rdar12991846/TestRdar12991846.py?rev=260638&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestRdar12991846.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestRdar12991846.py (removed) @@ -1,86 +0,0 @@ -# coding=utf8 -""" -Test that the expression parser returns proper Unicode strings. -""" - -from __future__ import print_function - - - -import unittest2 -import os, time -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -# this test case fails because of rdar://12991846 -# the expression parser does not deal correctly with Unicode expressions -# e.g. -#(lldb) expr L"Hello" -#(const wchar_t [6]) $0 = { -# [0] = \0\0\0\0 -# [1] = \0\0\0\0 -# [2] = \0\0\0\0 -# [3] = \0\0\0\0 -# [4] = H\0\0\0 -# [5] = e\0\0\0 -#} - -class Rdar12991846TestCase(TestBase): - -mydir = TestBase.compute_mydir(__file__) - -@unittest2.expectedFailure("rdar://18684408") -@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows") -def test_expr1(self): -"""Test that the expression parser returns proper Unicode strings.""" -self.build() -self.rdar12991846(expr=1) - -@unittest2.expectedFailure("rdar://18684408") -@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows") -def test_expr2(self): -"""Test that the expression parser returns proper Unicode strings.""" -self.build() -self.rdar12991846(expr=2) - -@unittest2.expectedFailure("rdar://18684408") -@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows") -def test_expr3(self): -"""Test that the expression parser returns proper Unicode strings.""" -self.build() -self.rdar12991846(expr=3) - -def setUp(self): -# Call super's setUp(). -TestBase.setUp(self) -# Find the line number to break for main.cpp. -self.source = 'main.cpp' -self.line = line_number(self.source, '// Set break point at this line.') - -def rdar12991846(self, expr=None): -"""Test that the expression parser returns proper Unicode strings.""" -if self.getArchitecture() in ['i386']: -self.skipTest("Skipping because this test is known to crash on i386") - -exe = os.path.join(os.getcwd(), "a.out") - -# Create a target by the debugger. -target = self.dbg.CreateTarget(exe) -self.assertTrue(target, VALID_TARGET) - -# Break on the struct declration statement in main.cpp. -lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line) - -# Now launch the process, and do not stop at entry point. -process = target.LaunchSimple (None, None, self.get_process_working_directory()) - -if not process: -self.fail("SBTarget.Launch() failed") - -if expr == 1: self.expect('expression L"hello"', substrs = ['hello']) - -if expr == 2: self.expect('expression u"hello"', substrs = ['hello']) - -if expr == 3: self.expect('expression U"hello"', substrs = ['hello']) Copied: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py (from r260638, lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rdar12991846/TestRdar12991846.py) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py?p2=lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py&p1=lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rdar12991846/TestRdar12991846
[Lldb-commits] [lldb] r260713 - Make Target::CalculateProcess() return a sensible result.
Author: spyffe Date: Fri Feb 12 13:45:31 2016 New Revision: 260713 URL: http://llvm.org/viewvc/llvm-project?rev=260713&view=rev Log: Make Target::CalculateProcess() return a sensible result. The Calculate* functions in general should not derive any information that isn't implicit, but for Target the process pointer is a member so it's fine to return it for CalculateProcess(). Modified: lldb/trunk/source/Target/Target.cpp Modified: lldb/trunk/source/Target/Target.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=260713&r1=260712&r2=260713&view=diff == --- lldb/trunk/source/Target/Target.cpp (original) +++ lldb/trunk/source/Target/Target.cpp Fri Feb 12 13:45:31 2016 @@ -1941,7 +1941,7 @@ Target::CalculateTarget () ProcessSP Target::CalculateProcess () { -return ProcessSP(); +return m_process_sp; } ThreadSP ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260715 - Objective-C++ is a kind of C++.
Author: spyffe Date: Fri Feb 12 13:47:57 2016 New Revision: 260715 URL: http://llvm.org/viewvc/llvm-project?rev=260715&view=rev Log: Objective-C++ is a kind of C++. Modified: lldb/trunk/source/Target/Language.cpp Modified: lldb/trunk/source/Target/Language.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Language.cpp?rev=260715&r1=260714&r2=260715&view=diff == --- lldb/trunk/source/Target/Language.cpp (original) +++ lldb/trunk/source/Target/Language.cpp Fri Feb 12 13:47:57 2016 @@ -241,6 +241,7 @@ Language::LanguageIsCPlusPlus (LanguageT case eLanguageTypeC_plus_plus_03: case eLanguageTypeC_plus_plus_11: case eLanguageTypeC_plus_plus_14: +case eLanguageTypeObjC_plus_plus: return true; default: return false; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17182: Adjust for Python-3.
sivachandra updated this revision to Diff 47835. sivachandra marked an inline comment as done. sivachandra added a comment. Address comments http://reviews.llvm.org/D17182 Files: packages/Python/lldbsuite/test/lldbtest.py packages/Python/lldbsuite/test/plugins/builder_linux.py packages/Python/lldbsuite/test/plugins/builder_linux2.py scripts/Python/modules/readline/readline.cpp source/API/liblldb.exports Index: source/API/liblldb.exports === --- source/API/liblldb.exports +++ source/API/liblldb.exports @@ -1,3 +1,4 @@ _ZN4lldb* _ZNK4lldb* init_lld* +PyInit__lldb Index: scripts/Python/modules/readline/readline.cpp === --- scripts/Python/modules/readline/readline.cpp +++ scripts/Python/modules/readline/readline.cpp @@ -20,11 +20,6 @@ // work around LLVM pr18841 to avoid seg faults in the stock Python // readline.so linked against GNU readline. -static struct PyMethodDef moduleMethods[] = -{ -{nullptr, nullptr, 0, nullptr} -}; - #ifndef LLDB_DISABLE_LIBEDIT PyDoc_STRVAR( moduleDocumentation, @@ -35,9 +30,33 @@ "Stub module meant to avoid linking GNU readline."); #endif +#if PY_MAJOR_VERSION >= 3 +static struct PyModuleDef readline_module = +{ +PyModuleDef_HEAD_INIT, // m_base +"readline",// m_name +moduleDocumentation, // m_doc +-1,// m_size +nullptr, // m_methods +nullptr, // m_reload +nullptr, // m_traverse +nullptr, // m_clear +nullptr, // m_free +}; +#else +static struct PyMethodDef moduleMethods[] = +{ +{nullptr, nullptr, 0, nullptr} +}; +#endif + #ifndef LLDB_DISABLE_LIBEDIT static char* +#if PY_MAJOR_VERSION >= 3 +simple_readline(FILE *stdin, FILE *stdout, const char *prompt) +#else simple_readline(FILE *stdin, FILE *stdout, char *prompt) +#endif { rl_instream = stdin; rl_outstream = stdout; @@ -67,10 +86,15 @@ #ifndef LLDB_DISABLE_LIBEDIT PyOS_ReadlineFunctionPointer = simple_readline; #endif + +#if PY_MAJOR_VERSION >= 3 +return PyModule_Create(&readline_module); +#else Py_InitModule4( "readline", moduleMethods, moduleDocumentation, static_cast(NULL), PYTHON_API_VERSION); +#endif } Index: packages/Python/lldbsuite/test/plugins/builder_linux2.py === --- /dev/null +++ packages/Python/lldbsuite/test/plugins/builder_linux2.py @@ -1,4 +0,0 @@ -from builder_base import * - -def buildDsym(sender=None, architecture=None, compiler=None, dictionary=None, clean=True): -return False Index: packages/Python/lldbsuite/test/lldbtest.py === --- packages/Python/lldbsuite/test/lldbtest.py +++ packages/Python/lldbsuite/test/lldbtest.py @@ -440,6 +440,10 @@ return __import__("builder_freebsd") if sys.platform.startswith("netbsd"): return __import__("builder_netbsd") +if sys.platform.startswith("linux"): +# sys.platform with Python-3.x returns 'linux', but with +# Python-2.x it returns 'linux2'. +return __import__("builder_linux") return __import__("builder_" + sys.platform) Index: source/API/liblldb.exports === --- source/API/liblldb.exports +++ source/API/liblldb.exports @@ -1,3 +1,4 @@ _ZN4lldb* _ZNK4lldb* init_lld* +PyInit__lldb Index: scripts/Python/modules/readline/readline.cpp === --- scripts/Python/modules/readline/readline.cpp +++ scripts/Python/modules/readline/readline.cpp @@ -20,11 +20,6 @@ // work around LLVM pr18841 to avoid seg faults in the stock Python // readline.so linked against GNU readline. -static struct PyMethodDef moduleMethods[] = -{ -{nullptr, nullptr, 0, nullptr} -}; - #ifndef LLDB_DISABLE_LIBEDIT PyDoc_STRVAR( moduleDocumentation, @@ -35,9 +30,33 @@ "Stub module meant to avoid linking GNU readline."); #endif +#if PY_MAJOR_VERSION >= 3 +static struct PyModuleDef readline_module = +{ +PyModuleDef_HEAD_INIT, // m_base +"readline",// m_name +moduleDocumentation, // m_doc +-1,// m_size +nullptr, // m_methods +nullptr, // m_reload +nullptr, // m_traverse +nullptr, // m_clear +nullptr, // m_free +}; +#else +static struct PyMethodDef moduleMethods[] = +{ +{nullptr, nullptr, 0, nullptr} +}; +#endif + #ifndef LLDB_DISABLE_LIBEDIT static char* +#if PY_MAJOR_VERSION >= 3 +simple_readline(FILE *stdin, FILE *stdout, const char *prompt) +#else simple_readline(FILE *stdin, FILE *stdout, char *prompt) +#endif { rl_instream = stdin; r
Re: [Lldb-commits] [PATCH] D17182: Adjust for Python-3.
sivachandra added inline comments. Comment at: source/API/liblldb.exports:4 @@ -3,1 +3,2 @@ init_lld* +PyInit__lld* labath wrote: > zturner wrote: > > I don't really know what the syntax of this file is, but the symbol is > > called `PyInit__lldb`, not `PyInit__lld`. Is this still correct? Does it > > matter that you're exporting both the Python 2 and the Python 3 symbol in > > both versions even when they're not defined? > This just restricts the exported symbols to the ones matching the wildcards, > so I don't think it matters that both are present. > OTOH, unless we know the reason why the `b` has to be omitted from the > wildcard, then I suggest you add it. I just followed the existing "convention". Works without the "*" as well, so removed it according to the suggestion. Comment at: source/API/liblldb.exports:4 @@ -3,1 +3,2 @@ init_lld* +PyInit__lld* sivachandra wrote: > labath wrote: > > zturner wrote: > > > I don't really know what the syntax of this file is, but the symbol is > > > called `PyInit__lldb`, not `PyInit__lld`. Is this still correct? Does > > > it matter that you're exporting both the Python 2 and the Python 3 symbol > > > in both versions even when they're not defined? > > This just restricts the exported symbols to the ones matching the > > wildcards, so I don't think it matters that both are present. > > OTOH, unless we know the reason why the `b` has to be omitted from the > > wildcard, then I suggest you add it. > I just followed the existing "convention". Works without the "*" as well, so > removed it according to the suggestion. zturner: The listing here does not say what *should* be exported, but that a symbol should be exported only if matches one of these regexes. http://reviews.llvm.org/D17182 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260721 - Adjust for Python-3.
Author: sivachandra Date: Fri Feb 12 14:30:47 2016 New Revision: 260721 URL: http://llvm.org/viewvc/llvm-project?rev=260721&view=rev Log: Adjust for Python-3. Summary: This does not yet give us a clean testsuite run but it does help with: 1. Actually building on linux 2. Run the testsuite with over 70% tests passing on linux. Reviewers: tfiala, labath, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17182 Added: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux.py - copied unchanged from r260720, lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux2.py Removed: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux2.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py lldb/trunk/scripts/Python/modules/readline/readline.cpp lldb/trunk/source/API/liblldb.exports Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=260721&r1=260720&r2=260721&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Feb 12 14:30:47 2016 @@ -440,6 +440,10 @@ def builder_module(): return __import__("builder_freebsd") if sys.platform.startswith("netbsd"): return __import__("builder_netbsd") +if sys.platform.startswith("linux"): +# sys.platform with Python-3.x returns 'linux', but with +# Python-2.x it returns 'linux2'. +return __import__("builder_linux") return __import__("builder_" + sys.platform) Removed: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux2.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux2.py?rev=260720&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux2.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_linux2.py (removed) @@ -1,4 +0,0 @@ -from builder_base import * - -def buildDsym(sender=None, architecture=None, compiler=None, dictionary=None, clean=True): -return False Modified: lldb/trunk/scripts/Python/modules/readline/readline.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modules/readline/readline.cpp?rev=260721&r1=260720&r2=260721&view=diff == --- lldb/trunk/scripts/Python/modules/readline/readline.cpp (original) +++ lldb/trunk/scripts/Python/modules/readline/readline.cpp Fri Feb 12 14:30:47 2016 @@ -20,11 +20,6 @@ // work around LLVM pr18841 to avoid seg faults in the stock Python // readline.so linked against GNU readline. -static struct PyMethodDef moduleMethods[] = -{ -{nullptr, nullptr, 0, nullptr} -}; - #ifndef LLDB_DISABLE_LIBEDIT PyDoc_STRVAR( moduleDocumentation, @@ -35,9 +30,33 @@ PyDoc_STRVAR( "Stub module meant to avoid linking GNU readline."); #endif +#if PY_MAJOR_VERSION >= 3 +static struct PyModuleDef readline_module = +{ +PyModuleDef_HEAD_INIT, // m_base +"readline",// m_name +moduleDocumentation, // m_doc +-1,// m_size +nullptr, // m_methods +nullptr, // m_reload +nullptr, // m_traverse +nullptr, // m_clear +nullptr, // m_free +}; +#else +static struct PyMethodDef moduleMethods[] = +{ +{nullptr, nullptr, 0, nullptr} +}; +#endif + #ifndef LLDB_DISABLE_LIBEDIT static char* +#if PY_MAJOR_VERSION >= 3 +simple_readline(FILE *stdin, FILE *stdout, const char *prompt) +#else simple_readline(FILE *stdin, FILE *stdout, char *prompt) +#endif { rl_instream = stdin; rl_outstream = stdout; @@ -67,10 +86,15 @@ initreadline(void) #ifndef LLDB_DISABLE_LIBEDIT PyOS_ReadlineFunctionPointer = simple_readline; #endif + +#if PY_MAJOR_VERSION >= 3 +return PyModule_Create(&readline_module); +#else Py_InitModule4( "readline", moduleMethods, moduleDocumentation, static_cast(NULL), PYTHON_API_VERSION); +#endif } Modified: lldb/trunk/source/API/liblldb.exports URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/liblldb.exports?rev=260721&r1=260720&r2=260721&view=diff == --- lldb/trunk/source/API/liblldb.exports (original) +++ lldb/trunk/source/API/liblldb.exports Fri Feb 12 14:30:47 2016 @@ -1,3 +1,4 @@ _ZN4lldb* _ZNK4lldb* init_lld* +PyInit__lldb ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260734 - Centralized symbol lookup in IRExecutionUnit, and fixed the code model.
Author: spyffe Date: Fri Feb 12 15:11:25 2016 New Revision: 260734 URL: http://llvm.org/viewvc/llvm-project?rev=260734&view=rev Log: Centralized symbol lookup in IRExecutionUnit, and fixed the code model. I'm preparing to remove symbol lookup from IRForTarget, where it constitutes a dreadful hack working around no-longer-existing JIT bugs. Thanks to our contributors, IRForTarget has a lot of smarts that IRExecutionUnit doesn't have, so I've cleaned them up a bit and moved them over to IRExecutionUnit. Also for historical reasons, IRExecutionUnit used the "Small" code model on non- ELF platforms (namely, OS X). That's no longer necessary, and we can use the same code model as everyone else on OS X. I've fixed that. Modified: lldb/trunk/include/lldb/Expression/IRExecutionUnit.h lldb/trunk/source/Expression/IRExecutionUnit.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Modified: lldb/trunk/include/lldb/Expression/IRExecutionUnit.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/IRExecutionUnit.h?rev=260734&r1=260733&r2=260734&view=diff == --- lldb/trunk/include/lldb/Expression/IRExecutionUnit.h (original) +++ lldb/trunk/include/lldb/Expression/IRExecutionUnit.h Fri Feb 12 15:11:25 2016 @@ -28,6 +28,7 @@ #include "lldb/Expression/IRMemoryMap.h" #include "lldb/Host/Mutex.h" #include "lldb/Symbol/ObjectFile.h" +#include "lldb/Symbol/SymbolContext.h" namespace llvm { @@ -71,6 +72,7 @@ public: std::unique_ptr &module_ap, ConstString &name, const lldb::TargetSP &target_sp, + const SymbolContext &sym_ctx, std::vector &cpu_features); //-- @@ -131,7 +133,16 @@ public: lldb::ModuleSP GetJITModule (); + +static lldb::addr_t +FindSymbol(const ConstString &name, + const SymbolContext &sc); +lldb::addr_t +FindSymbol(const ConstString &name) +{ +return FindSymbol(name, m_sym_ctx); +} private: //-- /// Look up the object in m_address_map that contains a given address, @@ -275,9 +286,6 @@ private: void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override { } -//-- -/// Passthrough interface stub -//-- uint64_t getSymbolAddress(const std::string &Name) override; void *getPointerToNamedFunction(const std::string &Name, @@ -387,6 +395,7 @@ private: std::vectorm_cpu_features; llvm::SmallVectorm_jitted_functions; ///< A vector of all functions that have been JITted into machine code const ConstString m_name; +SymbolContext m_sym_ctx; ///< Used for symbol lookups std::vectorm_failed_lookups; std::atomic m_did_jit; Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=260734&r1=260733&r2=260734&view=diff == --- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original) +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Fri Feb 12 15:11:25 2016 @@ -20,18 +20,24 @@ #include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" +#include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Symbol/SymbolVendor.h" +#include "lldb/Symbol/SymbolFile.h" #include "lldb/Expression/IRExecutionUnit.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/ObjCLanguageRuntime.h" +#include "lldb/../../source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" + using namespace lldb_private; IRExecutionUnit::IRExecutionUnit (std::unique_ptr &context_ap, std::unique_ptr &module_ap, ConstString &name, const lldb::TargetSP &target_sp, + const SymbolContext &sym_ctx, std::vector &cpu_features) : IRMemoryMap(target_sp), m_context_ap(context_ap.release()), @@ -39,6 +45,7 @@ IRExecutionUnit::IRExecutionUnit (std::u m_module(m_module_ap.get()), m_cpu_features(cpu_features), m_name(name), +m_sym_ctx(sym_ctx), m_did_jit(false), m_function_load_addr(LLDB_INVALID_ADDRESS), m_function_end_load_add
[Lldb-commits] [lldb] r260735 - IRInterpreter now recognizes expressions with constants it doesn't handle.
Author: spyffe Date: Fri Feb 12 15:16:58 2016 New Revision: 260735 URL: http://llvm.org/viewvc/llvm-project?rev=260735&view=rev Log: IRInterpreter now recognizes expressions with constants it doesn't handle. If an instruction has a constant that IRInterpreter doesn't know how to deal with (say, an array constant, because we can't materialize it to APInt) then we used to ignore that and only fail during expression execution. This is annoying because if IRInterpreter had just returned false from CanInterpret(), the JIT would have been used. Now the IRInterpreter checks constants as part of CanInterpret(), so this should hopefully no longer be an issue. Modified: lldb/trunk/source/Expression/IRInterpreter.cpp Modified: lldb/trunk/source/Expression/IRInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=260735&r1=260734&r2=260735&view=diff == --- lldb/trunk/source/Expression/IRInterpreter.cpp (original) +++ lldb/trunk/source/Expression/IRInterpreter.cpp Fri Feb 12 15:16:58 2016 @@ -465,6 +465,45 @@ static const char *memory_read_error static const char *infinite_loop_error = "Interpreter ran for too many cycles"; //static const char *bad_result_error = "Result of expression is in bad memory"; +static bool +CanResolveConstant (llvm::Constant *constant) +{ +switch (constant->getValueID()) +{ +default: +return false; +case Value::ConstantIntVal: +case Value::ConstantFPVal: +return true; +case Value::ConstantExprVal: +if (const ConstantExpr *constant_expr = dyn_cast(constant)) +{ +switch (constant_expr->getOpcode()) +{ +default: +return false; +case Instruction::IntToPtr: +case Instruction::PtrToInt: +case Instruction::BitCast: +return CanResolveConstant(constant_expr->getOperand(0)); +case Instruction::GetElementPtr: +{ +ConstantExpr::const_op_iterator op_cursor = constant_expr->op_begin(); +Constant *base = dyn_cast(*op_cursor); +if (!base) +return false; + +return CanResolveConstant(base); +} +} +} else { +return false; +} +case Value::ConstantPointerNullVal: +return true; +} +} + bool IRInterpreter::CanInterpret (llvm::Module &module, llvm::Function &function, @@ -610,6 +649,17 @@ IRInterpreter::CanInterpret (llvm::Modul error.SetErrorString(unsupported_operand_error); return false; } +} + +if (Constant *constant = llvm::dyn_cast(operand)) +{ +if (!CanResolveConstant(constant)) +{ +if (log) +log->Printf("Unsupported constant: %s", PrintValue(constant).c_str()); +error.SetErrorString(unsupported_operand_error); +return false; +} } } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260747 - Disable recognition of "using" declarations at translation-unit level.
Author: spyffe Date: Fri Feb 12 15:55:05 2016 New Revision: 260747 URL: http://llvm.org/viewvc/llvm-project?rev=260747&view=rev Log: Disable recognition of "using" declarations at translation-unit level. Currently CountDeclLevels uses the ASTs which have no distinction between separate translation units. If one .o file has a "using" declaration at translation unit level, that "using" declaration will be in the same translation unit as functions from other .o files in the same module. This leads to erroneous name conflicts as the CountDeclLevels-based function filtering logic accepts too many fucntions. In the future we will identify the translation units for top-level Decls more reliably and restore that functionality. There's a TODO to that effect in the code. Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=260747&r1=260746&r2=260747&view=diff == --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Feb 12 15:55:05 2016 @@ -9926,6 +9926,15 @@ ClangASTContext::CountDeclLevels (clang: { if (searched.find(it->second) != searched.end()) continue; + +// Currently DWARF has one shared translation unit for all Decls at top level, so this +// would erroneously find using statements anywhere. So don't look at the top-level +// translation unit. +// TODO fix this and add a testcase that depends on it. + +if (llvm::isa(it->second)) +continue; + searched.insert(it->second); symbol_file->ParseDeclsForContext(CompilerDeclContext(this, it->second)); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260752 - Data formatter support for libc++ std::atomic
Author: enrico Date: Fri Feb 12 16:18:24 2016 New Revision: 260752 URL: http://llvm.org/viewvc/llvm-project?rev=260752&view=rev Log: Data formatter support for libc++ std::atomic On libc++ std::atomic is a fairly simple data type (layout wise, at least), wrapping actual contents in a member variable named "__a_" All the formatters are doing is "peel away" this intermediate layer and exposing user data as direct children or values of the std::atomic root variable Fixes rdar://24329405 Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/main.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.h Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/CMakeLists.txt lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=260752&r1=260751&r2=260752&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Feb 12 16:18:24 2016 @@ -745,6 +745,7 @@ 942612F81B952C9B00EF842E /* ObjCLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6385E1B8FB7A2004FE1E4 /* ObjCLanguage.cpp */; }; 942829561A89614C00521B30 /* JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942829551A89614C00521B30 /* JSON.cpp */; }; 942829CC1A89839300521B30 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; }; + 9428BC2C1C6E64E4002A24D7 /* LibCxxAtomic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9428BC291C6E64DC002A24D7 /* LibCxxAtomic.cpp */; }; 94380B8219940B0A00BFE4A8 /* StringLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94380B8119940B0A00BFE4A8 /* StringLexer.cpp */; }; 943BDEFE1AA7B2F800789CE8 /* LLDBAssert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */; }; 944372DC171F6B4300E57C32 /* RegisterContextDummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 944372DA171F6B4300E57C32 /* RegisterContextDummy.cpp */; }; @@ -2484,6 +2485,8 @@ 942829541A89614000521B30 /* JSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = include/lldb/Utility/JSON.h; sourceTree = ""; }; 942829551A89614C00521B30 /* JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSON.cpp; path = source/Utility/JSON.cpp; sourceTree = ""; }; 942829C01A89835300521B30 /* lldb-argdumper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-argdumper"; sourceTree = BUILT_PRODUCTS_DIR; }; + 9428BC291C6E64DC002A24D7 /* LibCxxAtomic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxAtomic.cpp; path = Language/CPlusPlus/LibCxxAtomic.cpp; sourceTree = ""; }; + 9428BC2A1C6E64DC002A24D7 /* LibCxxAtomic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibCxxAtomic.h; path = Language/CPlusPlus/LibCxxAtomic.h; sourceTree = ""; }; 94380B8019940B0300BFE4A8 /* StringLexer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringLexer.h; path = include/lldb/Utility/StringLexer.h; sourceTree = ""; }; 94380B8119940B0A00BFE4A8 /* StringLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringLexer.cpp; path = source/Utility/StringLexer.cpp; sourceTree = ""; }; 943B90FC1B991586007BA499 /* VectorIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorIterator.h; path = include/lldb/DataFormatters/VectorIterator.h; sourceTree = ""; }; @@ -5510,6 +5513,8 @@ 945261B31B9A11E800BF138D /* CxxStringTypes.cpp */, 945261B61B9A11E800BF138D /* LibCxx.h */, 945261B51B9A11E800BF138D /* LibCxx.cpp */, + 9428BC2A1C6E64DC002A24D7 /* LibCxxAtomic.h */, +
[Lldb-commits] [PATCH] D17220: [CPlusPlus/LibCxxAtomic.cpp] Fix the path to the header file.
sivachandra created this revision. sivachandra added a reviewer: granata.enrico. sivachandra added a subscriber: lldb-commits. Gets the build going on Linux again. http://reviews.llvm.org/D17220 Files: source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp Index: source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp === --- source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp +++ source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp @@ -8,7 +8,7 @@ //===--===// #include "LibCxxAtomic.h" -#include "lldb-forward.h" +#include "lldb/lldb-forward.h" using namespace lldb; using namespace lldb_private; Index: source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp === --- source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp +++ source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp @@ -8,7 +8,7 @@ //===--===// #include "LibCxxAtomic.h" -#include "lldb-forward.h" +#include "lldb/lldb-forward.h" using namespace lldb; using namespace lldb_private; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260761 - Remove an unnecessary include
Author: enrico Date: Fri Feb 12 17:12:27 2016 New Revision: 260761 URL: http://llvm.org/viewvc/llvm-project?rev=260761&view=rev Log: Remove an unnecessary include Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp?rev=260761&r1=260760&r2=260761&view=diff == --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp (original) +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp Fri Feb 12 17:12:27 2016 @@ -8,7 +8,6 @@ //===--===// #include "LibCxxAtomic.h" -#include "lldb-forward.h" using namespace lldb; using namespace lldb_private; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17220: [CPlusPlus/LibCxxAtomic.cpp] Fix the path to the header file.
granata.enrico requested changes to this revision. granata.enrico added a comment. This revision now requires changes to proceed. This include is actually not necessary. I am removing it outright. Thanks! http://reviews.llvm.org/D17220 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] Buildbot numbers for week of 1/31/2016 - 2/06/2016
Hello everyone, Below are some buildbot numbers for the last week of 1/31/2016 - 2/6/2016. I have added a new report that shows a "status change ratio" for each builder. The idea is to provide some kind of metrics for a noise level a builder produces. The number is a percent of builds that changed the builder status from greed to red or from red to green. The high number is not that bad, as faster builders would show a higher ratio in general, just because they build more often and more granular. We also have a different number of broken builds day to day. But I hope this would give us another data point to tell our build bot health. Thanks Galina buildername | builds | changes | status change ratio ---++-+- sanitizer-x86_64-linux| 99 | 51 |51.5 clang-ppc64le-linux-lnt | 81 | 28 |34.6 lldb-x86_64-darwin-13.4 | 84 | 25 |29.8 lldb-x86_64-ubuntu-14.04-android |108 | 32 |29.6 lldb-windows7-android |116 | 34 |29.3 clang-native-aarch64-full | 18 | 4 |22.2 clang-cmake-aarch64-full | 42 | 8 |19.0 perf-x86_64-penryn-O3-polly |135 | 18 |13.3 clang-cmake-armv7-a15-selfhost-neon | 24 | 3 |12.5 sanitizer-windows |330 | 41 |12.4 sanitizer-ppc64le-linux | 50 | 6 |12.0 sanitizer-ppc64be-linux |100 | 12 |12.0 clang-native-arm-lnt-perf | 9 | 1 |11.1 clang-cmake-mips | 82 | 8 | 9.8 clang-x64-ninja-win7 |177 | 16 | 9.0 clang-cmake-thumbv7-a15-full-sh | 23 | 2 | 8.7 sanitizer-x86_64-linux-bootstrap | 58 | 5 | 8.6 clang-cmake-aarch64-42vma |151 | 10 | 6.6 lldb-x86_64-ubuntu-14.04-cmake|225 | 14 | 6.2 clang-ppc64le-linux-multistage| 84 | 5 | 6.0 perf-x86_64-penryn-O3-polly-fast |105 | 6 | 5.7 perf-x86_64-penryn-O3 |195 | 11 | 5.6 clang-x86-win2008-selfhost|173 | 9 | 5.2 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast|356 | 17 | 4.8 clang-cmake-armv7-a15-full| 83 | 4 | 4.8 clang-cmake-mipsel| 22 | 1 | 4.5 llvm-mips-linux | 44 | 2 | 4.5 lldb-x86-windows-msvc2015 |221 | 10 | 4.5 perf-x86_64-penryn-O3-polly-before-vectorizer | 91 | 4 | 4.4 clang-ppc64be-linux-multistage|140 | 6 | 4.3 clang-native-arm-lnt | 95 | 4 | 4.2 clang-cmake-aarch64-quick |143 | 6 | 4.2 lld-x86_64-freebsd|197 | 8 | 4.1 sanitizer-x86_64-linux-fast |176 | 7 | 4.0 clang-cmake-thumbv7-a15 |177 | 6 | 3.4 polly-amd64-linux |235 | 8 | 3.4 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only | 91 | 3 | 3.3 lldb-x86_64-ubuntu-14.04-buildserver |129 | 4 | 3.1 sanitizer-x86_64-linux-fuzzer |205 | 6 | 2.9 lldb-amd64-ninja-netbsd7 |142 | 4 | 2.8 clang-bpf-build |292 | 7 | 2.4 clang-cmake-armv7-a15 |170 | 4 | 2.4 clang-ppc64be-linux |271 | 6 | 2.2 clang-s390x-linux |274 | 6 |
[Lldb-commits] [lldb] r260767 - Fix stripping of _ when looking for symbols in IRExecutionUnit.
Author: spyffe Date: Fri Feb 12 17:55:13 2016 New Revision: 260767 URL: http://llvm.org/viewvc/llvm-project?rev=260767&view=rev Log: Fix stripping of _ when looking for symbols in IRExecutionUnit. Previously we would try both versions of a symbol -- the one with _ in it and the one without -- in all cases, because we didn't know what the current platform's policy was. However, stripping _ is only necessary on platforms where _ is the prefix for global symbols. There's an API that does this, though, on llvm::DataLayout, so this patch fixes IRExecutionUnit to use that API to determine whether or not to strip _ from the symbol or not. Modified: lldb/trunk/include/lldb/Expression/IRExecutionUnit.h lldb/trunk/source/Expression/IRExecutionUnit.cpp Modified: lldb/trunk/include/lldb/Expression/IRExecutionUnit.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/IRExecutionUnit.h?rev=260767&r1=260766&r2=260767&view=diff == --- lldb/trunk/include/lldb/Expression/IRExecutionUnit.h (original) +++ lldb/trunk/include/lldb/Expression/IRExecutionUnit.h Fri Feb 12 17:55:13 2016 @@ -134,15 +134,9 @@ public: lldb::ModuleSP GetJITModule (); -static lldb::addr_t -FindSymbol(const ConstString &name, - const SymbolContext &sc); - lldb::addr_t -FindSymbol(const ConstString &name) -{ -return FindSymbol(name, m_sym_ctx); -} +FindSymbol(const ConstString &name); + private: //-- /// Look up the object in m_address_map that contains a given address, @@ -212,6 +206,25 @@ private: DisassembleFunction (Stream &stream, lldb::ProcessSP &process_sp); +struct SearchSpec; + +void +CollectCandidateCNames(std::vector &C_specs, + const ConstString &name); + +void +CollectCandidateCPlusPlusNames(std::vector &CPP_specs, + const std::vector &C_specs, + const SymbolContext &sc); + +lldb::addr_t +FindInSymbols(const std::vector &specs, + const lldb_private::SymbolContext &sc); + +lldb::addr_t +FindInRuntimes(const std::vector &specs, + const lldb_private::SymbolContext &sc); + void ReportSymbolLookupError(const ConstString &name); @@ -402,6 +415,8 @@ private: lldb::addr_tm_function_load_addr; lldb::addr_tm_function_end_load_addr; + +boolm_strip_underscore; ///< True for platforms where global symbols have a _ prefix }; } // namespace lldb_private Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=260767&r1=260766&r2=260767&view=diff == --- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original) +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Fri Feb 12 17:55:13 2016 @@ -325,6 +325,8 @@ IRExecutionUnit::GetRunnableInfo(Error & mAttrs); m_execution_engine_ap.reset(builder.create(target_machine)); + +m_strip_underscore = (m_execution_engine_ap->getDataLayout().getGlobalPrefix() == '_'); if (!m_execution_engine_ap.get()) { @@ -644,64 +646,6 @@ IRExecutionUnit::MemoryManager::allocate return return_value; } -static void -FindCodeSymbolInContext(const ConstString &name, -const SymbolContext &sym_ctx, -uint32_t name_type_mask, -SymbolContextList &sc_list) -{ -sc_list.Clear(); -SymbolContextList temp_sc_list; -if (sym_ctx.module_sp) -sym_ctx.module_sp->FindFunctions(name, - NULL, - name_type_mask, - true, // include_symbols - false, // include_inlines - true, // append - temp_sc_list); -if (temp_sc_list.GetSize() == 0) -{ -if (sym_ctx.target_sp) -sym_ctx.target_sp->GetImages().FindFunctions(name, - name_type_mask, - true, // include_symbols - false, // include_inlines - true, // append - temp_sc_list); -} - -SymbolContextList i
[Lldb-commits] [lldb] r260768 - Removed many JIT workarounds from IRForTarget.
Author: spyffe Date: Fri Feb 12 18:01:46 2016 New Revision: 260768 URL: http://llvm.org/viewvc/llvm-project?rev=260768&view=rev Log: Removed many JIT workarounds from IRForTarget. Since IRExecutionUnit is now capable of looking up symbols, and the JIT is up to the task of generating the appropriate relocations, we don't need to do all the work that IRForTarget used to do to fixup symbols at the IR level. We also don't need to allocate data manually (with its attendant bugs) because the JIT is capable of doing so without crashing. We also don't need the awkward lldb.call.realName metadata to determine what calls are objc_msgSend, because they now just reference objc_msgSend. To make this work, we ensure that we recognize which symbols are extern "C" and report them to the compiler as such. We also report the full Decl of functions rather than just making up top-level functions with the appropriate types. This should not break any testcases, but let me know if you run into any issues. Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRDynamicChecks.cpp?rev=260768&r1=260767&r2=260768&view=diff == --- lldb/trunk/source/Expression/IRDynamicChecks.cpp (original) +++ lldb/trunk/source/Expression/IRDynamicChecks.cpp Fri Feb 12 18:01:46 2016 @@ -506,6 +506,32 @@ protected: return true; } + +static llvm::Function *GetFunction(llvm::Value *value) +{ +if (llvm::Function *function = llvm::dyn_cast(value)) +{ +return function; +} + +if (llvm::ConstantExpr *const_expr = llvm::dyn_cast(value)) +{ +switch (const_expr->getOpcode()) +{ +default: +return nullptr; +case llvm::Instruction::BitCast: +return GetFunction(const_expr->getOperand(0)); +} +} + +return nullptr; +} + +static llvm::Function *GetCalledFunction(llvm::CallInst *inst) +{ +return GetFunction(inst->getCalledValue()); +} bool InspectInstruction(llvm::Instruction &i) override { @@ -515,35 +541,12 @@ protected: if (call_inst) { -// This metadata is set by IRForTarget::MaybeHandleCall(). - -MDNode *metadata = call_inst->getMetadata("lldb.call.realName"); - -if (!metadata) +const llvm::Function *called_function = GetCalledFunction(call_inst); + +if (!called_function) return true; - -if (metadata->getNumOperands() != 1) -{ -if (log) -log->Printf("Function call metadata has %d operands for [%p] %s", -metadata->getNumOperands(), -static_cast(call_inst), -PrintValue(call_inst).c_str()); -return false; -} - -MDString *real_name = dyn_cast(metadata->getOperand(0)); - -if (!real_name) -{ -if (log) -log->Printf("Function call metadata is not an MDString for [%p] %s", -static_cast(call_inst), -PrintValue(call_inst).c_str()); -return false; -} - -std::string name_str = real_name->getString(); + +std::string name_str = called_function->getName().str(); const char* name_cstr = name_str.c_str(); if (log) Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp?rev=260768&r1=260767&r2=260768&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp Fri Feb 12 18:01:46 2016 @@ -515,248 +515,6 @@ ClangExpressionDeclMap::GetFunctionInfo return true; } -static void -FindCodeSymbolInContext -( -const ConstString &name, -SymbolContext &sym_ctx, -uint32_t name_type_mask, -SymbolContextList &sc_list -) -{ -sc_list.Clear(); -SymbolContextList temp_sc_list; -if (sym_ctx.module_sp) -sym_ctx.module_sp->FindFunctions(name, -
[Lldb-commits] [PATCH] D17227: [TestLibCxxAtomic] Fix Makefile so that the test builds on Linux.
sivachandra created this revision. sivachandra added a reviewer: granata.enrico. sivachandra added a subscriber: lldb-commits. http://reviews.llvm.org/D17227 Files: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile Index: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile === --- packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile +++ packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile @@ -1,4 +1,5 @@ LEVEL = ../../../../../make CXX_SOURCES := main.cpp CXXFLAGS += -std=c++11 +USE_LIBCPP := 1 include $(LEVEL)/Makefile.rules Index: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile === --- packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile +++ packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile @@ -1,4 +1,5 @@ LEVEL = ../../../../../make CXX_SOURCES := main.cpp CXXFLAGS += -std=c++11 +USE_LIBCPP := 1 include $(LEVEL)/Makefile.rules ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260770 - [TestLibCxxAtomic] Fix Makefile so that the test builds on Linux.
Author: sivachandra Date: Fri Feb 12 18:09:42 2016 New Revision: 260770 URL: http://llvm.org/viewvc/llvm-project?rev=260770&view=rev Log: [TestLibCxxAtomic] Fix Makefile so that the test builds on Linux. Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17227 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile?rev=260770&r1=260769&r2=260770&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile Fri Feb 12 18:09:42 2016 @@ -1,4 +1,5 @@ LEVEL = ../../../../../make CXX_SOURCES := main.cpp CXXFLAGS += -std=c++11 +USE_LIBCPP := 1 include $(LEVEL)/Makefile.rules ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260772 - Adding an SBThread::StepInto that takes an end-line, also moved the code that figures
Author: jingham Date: Fri Feb 12 18:31:47 2016 New Revision: 260772 URL: http://llvm.org/viewvc/llvm-project?rev=260772&view=rev Log: Adding an SBThread::StepInto that takes an end-line, also moved the code that figures out the address range for the step to SymbolContext. Modified: lldb/trunk/include/lldb/API/SBThread.h lldb/trunk/include/lldb/Symbol/SymbolContext.h lldb/trunk/scripts/interface/SBThread.i lldb/trunk/source/API/SBThread.cpp lldb/trunk/source/Commands/CommandObjectThread.cpp lldb/trunk/source/Symbol/SymbolContext.cpp Modified: lldb/trunk/include/lldb/API/SBThread.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=260772&r1=260771&r2=260772&view=diff == --- lldb/trunk/include/lldb/API/SBThread.h (original) +++ lldb/trunk/include/lldb/API/SBThread.h Fri Feb 12 18:31:47 2016 @@ -116,6 +116,12 @@ public: StepInto (const char *target_name, lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); void +StepInto (const char *target_name, + uint32_t end_line, + SBError &error, + lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); + +void StepOut (); void Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=260772&r1=260771&r2=260772&view=diff == --- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original) +++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Fri Feb 12 18:31:47 2016 @@ -244,6 +244,9 @@ public: uint32_t range_idx, bool use_inline_block_range, AddressRange &range) const; + +bool +GetAddressRangeFromHereToEndLine(uint32_t end_line, AddressRange &range, Error &error); void GetDescription(Stream *s, Modified: lldb/trunk/scripts/interface/SBThread.i URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBThread.i?rev=260772&r1=260771&r2=260772&view=diff == --- lldb/trunk/scripts/interface/SBThread.i (original) +++ lldb/trunk/scripts/interface/SBThread.i Fri Feb 12 18:31:47 2016 @@ -206,6 +206,17 @@ public: void StepInto (const char *target_name, lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); +%feature("autodoc", " +Step the current thread from the current source line to the line given by end_line, stopping if +the thread steps into the function given by target_name. If target_name is None, then stepping will stop +in any of the places we would normally stop. +") StepInto; +void +StepInto (const char *target_name, + uint32_t end_line, + SBError &error, + lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); + void StepOut (); Modified: lldb/trunk/source/API/SBThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=260772&r1=260771&r2=260772&view=diff == --- lldb/trunk/source/API/SBThread.cpp (original) +++ lldb/trunk/source/API/SBThread.cpp Fri Feb 12 18:31:47 2016 @@ -774,6 +774,13 @@ SBThread::StepInto (lldb::RunMode stop_o void SBThread::StepInto (const char *target_name, lldb::RunMode stop_other_threads) { +SBError error; +StepInto(target_name, LLDB_INVALID_LINE_NUMBER, error, stop_other_threads); +} + +void +SBThread::StepInto (const char *target_name, uint32_t end_line, SBError &error, lldb::RunMode stop_other_threads) +{ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); Mutex::Locker api_locker; @@ -795,11 +802,20 @@ SBThread::StepInto (const char *target_n if (frame_sp && frame_sp->HasDebugInformation ()) { +SymbolContext sc(frame_sp->GetSymbolContext(eSymbolContextEverything)); +AddressRange range; +if (end_line == LLDB_INVALID_LINE_NUMBER) +range = sc.line_entry.range; +else +{ +if (!sc.GetAddressRangeFromHereToEndLine(end_line, range, error.ref())) +return; +} + const LazyBool step_out_avoids_code_without_debug_info = eLazyBoolCalculate; const LazyBool step_in_avoids_code_without_debug_info = eLazyBoolCalculate; -SymbolContext sc(frame_sp->GetSymbolContext(eSymbolContextEverything)); new_plan_sp = thread->QueueThreadPlanForStepInRange (abort_other_plans, - sc.line_entry, + range,
[Lldb-commits] [PATCH] D17230: [TestLibCxxAtomic] Skip for GCC.
sivachandra created this revision. sivachandra added a reviewer: sivachandra. sivachandra added a subscriber: lldb-commits. This is the form on other libc++ tests. http://reviews.llvm.org/D17230 Files: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py Index: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py === --- packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py +++ packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py @@ -22,6 +22,7 @@ var.SetPreferSyntheticValue(True) return var +@skipIf(compiler="gcc") @skipIfWindows # libc++ not ported to Windows yet def test(self): """Test that std::atomic as defined by libc++ is correctly printed by LLDB""" Index: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py === --- packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py +++ packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py @@ -22,6 +22,7 @@ var.SetPreferSyntheticValue(True) return var +@skipIf(compiler="gcc") @skipIfWindows # libc++ not ported to Windows yet def test(self): """Test that std::atomic as defined by libc++ is correctly printed by LLDB""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260793 - [TestLibCxxAtomic] Skip for GCC.
Author: sivachandra Date: Fri Feb 12 20:11:11 2016 New Revision: 260793 URL: http://llvm.org/viewvc/llvm-project?rev=260793&view=rev Log: [TestLibCxxAtomic] Skip for GCC. Summary: This is the form on other libc++ tests. Reviewers: sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17230 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py?rev=260793&r1=260792&r2=260793&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py Fri Feb 12 20:11:11 2016 @@ -22,6 +22,7 @@ class LibCxxAtomicTestCase(TestBase): var.SetPreferSyntheticValue(True) return var +@skipIf(compiler="gcc") @skipIfWindows # libc++ not ported to Windows yet def test(self): """Test that std::atomic as defined by libc++ is correctly printed by LLDB""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17230: [TestLibCxxAtomic] Skip for GCC.
This revision was automatically updated to reflect the committed changes. Closed by commit rL260793: [TestLibCxxAtomic] Skip for GCC. (authored by sivachandra). Changed prior to commit: http://reviews.llvm.org/D17230?vs=47885&id=47886#toc Repository: rL LLVM http://reviews.llvm.org/D17230 Files: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py @@ -22,6 +22,7 @@ var.SetPreferSyntheticValue(True) return var +@skipIf(compiler="gcc") @skipIfWindows # libc++ not ported to Windows yet def test(self): """Test that std::atomic as defined by libc++ is correctly printed by LLDB""" Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py === --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py @@ -22,6 +22,7 @@ var.SetPreferSyntheticValue(True) return var +@skipIf(compiler="gcc") @skipIfWindows # libc++ not ported to Windows yet def test(self): """Test that std::atomic as defined by libc++ is correctly printed by LLDB""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r260803 - Additional fix to my change in r259983 to handle the
Author: jmolenda Date: Fri Feb 12 22:15:02 2016 New Revision: 260803 URL: http://llvm.org/viewvc/llvm-project?rev=260803&view=rev Log: Additional fix to my change in r259983 to handle the case where a core file has a kernel binary and a user process dyld in the same one. Without this, we were always picking the dyld and trying to process it as a kernel. Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=260803&r1=260802&r2=260803&view=diff == --- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original) +++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Fri Feb 12 22:15:02 2016 @@ -343,21 +343,27 @@ ProcessMachCore::DoLoadCore () // search heuristics might identify the correct one. // Most of the time, I expect the address from SearchForDarwinKernel() will be the // same as the address we found via exhaustive search. -// -// NB SearchForDarwinKernel will end up calling back into this this class in the GetImageInfoAddress -// method which will give it the m_mach_kernel_addr address it already has. Save that aside -// and set m_mach_kernel_addr to an invalid address temporarily so DynamicLoaderDarwinKernel does -// a real search for the kernel using its own heuristics. if (GetTarget().GetArchitecture().IsValid() == false && m_core_module_sp.get()) { GetTarget().SetArchitecture (m_core_module_sp->GetArchitecture()); } +// SearchForDarwinKernel will end up calling back into this this class in the GetImageInfoAddress +// method which will give it the m_mach_kernel_addr/m_dyld_addr it already has. Save that aside +// and set m_mach_kernel_addr/m_dyld_addr to an invalid address temporarily so +// DynamicLoaderDarwinKernel does a real search for the kernel using its own heuristics. + addr_t saved_mach_kernel_addr = m_mach_kernel_addr; +addr_t saved_user_dyld_addr = m_dyld_addr; m_mach_kernel_addr = LLDB_INVALID_ADDRESS; +m_dyld_addr = LLDB_INVALID_ADDRESS; + addr_t better_kernel_address = DynamicLoaderDarwinKernel::SearchForDarwinKernel (this); + m_mach_kernel_addr = saved_mach_kernel_addr; +m_dyld_addr = saved_user_dyld_addr; + if (better_kernel_address != LLDB_INVALID_ADDRESS) { if (log) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits