[Lldb-commits] [lldb] r252298 - Fix for AArch64 watchpoint cache corruption in case of ptrace failure
Author: omjavaid Date: Fri Nov 6 06:56:34 2015 New Revision: 252298 URL: http://llvm.org/viewvc/llvm-project?rev=252298&view=rev Log: Fix for AArch64 watchpoint cache corruption in case of ptrace failure Same fix has been submitted for Arm. Review can be found here: Differential revision: http://reviews.llvm.org/D14051 Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp?rev=252298&r1=252297&r2=252298&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp Fri Nov 6 06:56:34 2015 @@ -435,7 +435,7 @@ NativeRegisterContextLinux_arm64::SetHar if (bp_index == LLDB_INVALID_INDEX32) return LLDB_INVALID_INDEX32; -// Add new or update existing watchpoint +// Add new or update existing breakpoint if ((m_hbr_regs[bp_index].control & 1) == 0) { m_hbr_regs[bp_index].address = addr; @@ -446,7 +446,13 @@ NativeRegisterContextLinux_arm64::SetHar error = WriteHardwareDebugRegs(eDREGTypeBREAK); if (error.Fail()) +{ +m_hbr_regs[bp_index].address = 0; +m_hbr_regs[bp_index].control &= ~1; +m_hbr_regs[bp_index].refcount = 0; + return LLDB_INVALID_INDEX32; +} } else m_hbr_regs[bp_index].refcount++; @@ -481,6 +487,11 @@ NativeRegisterContextLinux_arm64::ClearH } else if (m_hbr_regs[hw_idx].refcount == 1) { +// Create a backup we can revert to in case of failure. +lldb::addr_t tempAddr = m_hbr_regs[hw_idx].address; +uint32_t tempControl = m_hbr_regs[hw_idx].control; +uint32_t tempRefCount = m_hbr_regs[hw_idx].refcount; + m_hbr_regs[hw_idx].control &= ~1; m_hbr_regs[hw_idx].address = 0; m_hbr_regs[hw_idx].refcount = 0; @@ -489,7 +500,13 @@ NativeRegisterContextLinux_arm64::ClearH WriteHardwareDebugRegs(eDREGTypeBREAK); if (error.Fail()) +{ +m_hbr_regs[hw_idx].control = tempControl; +m_hbr_regs[hw_idx].address = tempAddr; +m_hbr_regs[hw_idx].refcount = tempRefCount; + return false; +} return true; } @@ -595,7 +612,13 @@ NativeRegisterContextLinux_arm64::SetHar error = WriteHardwareDebugRegs(eDREGTypeWATCH); if (error.Fail()) +{ +m_hwp_regs[wp_index].address = 0; +m_hwp_regs[wp_index].control &= ~1; +m_hwp_regs[wp_index].refcount = 0; + return LLDB_INVALID_INDEX32; +} } else m_hwp_regs[wp_index].refcount++; @@ -630,6 +653,11 @@ NativeRegisterContextLinux_arm64::ClearH } else if (m_hwp_regs[wp_index].refcount == 1) { +// Create a backup we can revert to in case of failure. +lldb::addr_t tempAddr = m_hwp_regs[wp_index].address; +uint32_t tempControl = m_hwp_regs[wp_index].control; +uint32_t tempRefCount = m_hwp_regs[wp_index].refcount; + // Update watchpoint in local cache m_hwp_regs[wp_index].control &= ~1; m_hwp_regs[wp_index].address = 0; @@ -639,7 +667,13 @@ NativeRegisterContextLinux_arm64::ClearH error = WriteHardwareDebugRegs(eDREGTypeWATCH); if (error.Fail()) +{ +m_hwp_regs[wp_index].control = tempControl; +m_hwp_regs[wp_index].address = tempAddr; +m_hwp_regs[wp_index].refcount = tempRefCount; + return false; +} return true; } @@ -663,10 +697,18 @@ NativeRegisterContextLinux_arm64::ClearA if (error.Fail()) return error; +lldb::addr_t tempAddr = 0; +uint32_t tempControl = 0, tempRefCount = 0; + for (uint32_t i = 0; i < m_max_hwp_supported; i++) { if (m_hwp_regs[i].control & 0x01) { +// Create a backup we can revert to in case of failure. +tempAddr = m_hwp_regs[i].address; +tempControl = m_hwp_regs[i].control; +tempRefCount = m_hwp_regs[i].refcount; + // Clear watchpoints in local cache m_hwp_regs[i].control &= ~1; m_hwp_regs[i].address = 0; @@ -676,7 +718,13 @@ NativeRegisterContextLinux_arm64::ClearA error = WriteHardwareDebugRegs(eDREGTypeWATCH); if (error.Fail()) +{ +m_hwp_regs[i].control = tempControl; +m_hwp_regs[i].address = tempAddr; +m_hwp_regs[i].refcount = tempRefCount; + return error; +} } } ___
Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators
zturner added a comment. In http://reviews.llvm.org/D14406#283034, @labath wrote: > (The upstream unittest does not seem to have the bugnumber feature. I am > assuming the intention here is to make this upstream compatible, in hope of > moving over there at some point.) I can leave the bugnumber thing in there for now, just to reduce the impact of this change and the risk of messing something up. http://reviews.llvm.org/D14406 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.
zturner added a comment. If it's never used in practice, can you just delete the codepath entirely? I'm a strong proponent of deleting code that nobody cares about. (Of course, if you found this because you do care about it and this codepath didn't work when you tried to use it, that's a different story) http://reviews.llvm.org/D14415 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252325 - Make Windows always use multiprocessing-pool.
Author: zturner Date: Fri Nov 6 12:14:31 2015 New Revision: 252325 URL: http://llvm.org/viewvc/llvm-project?rev=252325&view=rev Log: Make Windows always use multiprocessing-pool. We still see "Too many file handles" errors on Windows even with lower numbers of cores. It's not clear what the right balance is, and the bar seems to move as more tests get added. So just use the strategy that works until we can investigate more deeply. Modified: lldb/trunk/packages/Python/lldbsuite/test/dosep.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dosep.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dosep.py?rev=252325&r1=252324&r2=252325&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dosep.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dosep.py Fri Nov 6 12:14:31 2015 @@ -1264,11 +1264,10 @@ def default_test_runner_name(num_threads elif os.name == "nt": # On Windows, Python uses CRT with a low limit on the number of open # files. If you have a lot of cores, the threading-pool runner will -# often fail because it exceeds that limit. -if num_threads > 32: -test_runner_name = "multiprocessing-pool" -else: -test_runner_name = "threading-pool" +# often fail because it exceeds that limit. It's not clear what the +# right balance is, so until we can investigate it more deeply, +# just use the one that works +test_runner_name = "multiprocessing-pool" elif is_darwin_version_lower_than( distutils.version.StrictVersion("10.10.0")): # OS X versions before 10.10 appear to have an issue using ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252326 - Don't use module internal implementation details in our decorators.
Author: zturner Date: Fri Nov 6 12:14:42 2015 New Revision: 252326 URL: http://llvm.org/viewvc/llvm-project?rev=252326&view=rev Log: Don't use module internal implementation details in our decorators. We tried implementing something akin to a conditionalExpectedFailure decorator for unittest2. We did this by making use of some implementation details of the unittest2 module. In an effort to make this work with unittest, this patch removes the reliance on the implementation details. I have a hard time wrapping my head around how this all works with the deeply nested decorators, but the spirit of the patch here is to do do the following: If the condition function is true, use the original unittest2.expectedFailure decorator. Otherwise don't use any decorator, just call the test function. Differential Revision: http://reviews.llvm.org/D14406 Reviewed By: tberghammer, labath Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py 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=252326&r1=252325&r2=252326&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov 6 12:14:42 2015 @@ -601,15 +601,11 @@ def expectedFailure(expected_fn, bugnumb def wrapper(*args, **kwargs): from unittest2 import case self = args[0] -try: -func(*args, **kwargs) -except Exception: -if expected_fn(self): -raise case._ExpectedFailure(sys.exc_info(), bugnumber) -else: -raise if expected_fn(self): -raise case._UnexpectedSuccess(sys.exc_info(), bugnumber) +xfail_func = unittest2.expectedFailure(func) +xfail_func(*args, **kwargs) +else: +func(*args, **kwargs) return wrapper # if bugnumber is not-callable(incluing None), that means decorator function is called with optional arguments # return decorator in this case, so it will be used to decorating original method ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators
zturner added inline comments. Comment at: packages/Python/lldbsuite/test/lldbtest.py:605 @@ -611,2 +604,3 @@ if expected_fn(self): -raise case._UnexpectedSuccess(sys.exc_info(), bugnumber) +xfail_func = unittest2.expectedFailure(func) +xfail_func(*args, **kwargs) tberghammer wrote: > You are swallowing the bug number here > > Based on the implementation of unittest2.expectedFailure I think you should > write the following to preserve it (I haven't tested it): > > ``` > unittest2.expectedFailure(bugnumber)(func) > ``` Actually I think it already has the same sematnics. When I use your version it doesn't work. I think it works with my version because of the `if six.callable(bugnumber)` check on line 610 (which is cut out in the context here, but you can check it). I'll put it in like this and see what happens http://reviews.llvm.org/D14406 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators
tberghammer added a comment. If the purpose of the change to get closer to upstream then I am fine with removing the bug number here. In general I don't feel it is a that high risk change, but I might miss something. http://reviews.llvm.org/D14406 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.
brucem added a comment. Well, I'm pretty sure ... but I don't know if someone in some configuration or set of build arrangements might use it. It might also be used if we ever make the Makefiles or xcode projects use these scripts. http://reviews.llvm.org/D14415 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.
zturner added a comment. Eh, just delete it IMO. I don't like leaving code around "just in case". These scripts already need to be practically re-written (due to not using the standard argparse module), the less work we have to do the better. CMake is the only user of this script as far as I know. If it breaks someone they'll chime in presumably http://reviews.llvm.org/D14415 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14163: Address another race condition running tests on Windows
zturner added a comment. Feel free to get this in. Maybe put it in file `lldbsuite/support/filesystem.py` http://reviews.llvm.org/D14163 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14453: Python 3 - Fix some portability issues with class / instance attributes
zturner created this revision. zturner added reviewers: tfiala, labath, tberghammer. zturner added a subscriber: lldb-commits. TBH I'm honestly not sure what the problem was before, or why this fixes it. But what I can tell from debugging is that under Py3, `sortMethodsUsing` is treated as a class attribute, but it was being accessed as `self.sortMethodsUsing`. What the full implications of this are I don't quite know, but the symptom here was that the value we were assigning to it -- the global lambda `cmp_` -- was being treated as a bound method instead of a global method. So it was expecting to be called with a `self` argument, and I got an exception saying the method expected 3 arguments but received 2. Why exactly this happens in Python 3, and why exactly this *doesn't* happen in Python 2, even though the syntax was identical in both cases are not clear to me. http://reviews.llvm.org/D14453 Files: third_party/Python/module/unittest2/unittest2/__init__.py third_party/Python/module/unittest2/unittest2/loader.py third_party/Python/module/unittest2/unittest2/test/test_loader.py Index: third_party/Python/module/unittest2/unittest2/test/test_loader.py === --- third_party/Python/module/unittest2/unittest2/test/test_loader.py +++ third_party/Python/module/unittest2/unittest2/test/test_loader.py @@ -1104,15 +1104,12 @@ # "Function to be used to compare method names when sorting them in # getTestCaseNames() and all the loadTestsFromX() methods" def test_sortTestMethodsUsing__loadTestsFromTestCase(self): -def reversed_cmp(x, y): -return -cmp(x, y) - class Foo(unittest2.TestCase): def test_1(self): pass def test_2(self): pass loader = unittest2.TestLoader() -loader.sortTestMethodsUsing = reversed_cmp +loader.sortTestMethodsUsing = unittest2.reversed_cmp_ tests = loader.suiteClass([Foo('test_2'), Foo('test_1')]) self.assertEqual(loader.loadTestsFromTestCase(Foo), tests) @@ -1120,9 +1117,6 @@ # "Function to be used to compare method names when sorting them in # getTestCaseNames() and all the loadTestsFromX() methods" def test_sortTestMethodsUsing__loadTestsFromModule(self): -def reversed_cmp(x, y): -return -cmp(x, y) - m = types.ModuleType('m') class Foo(unittest2.TestCase): def test_1(self): pass @@ -1130,7 +1124,7 @@ m.Foo = Foo loader = unittest2.TestLoader() -loader.sortTestMethodsUsing = reversed_cmp +loader.sortTestMethodsUsing = unittest2.reversed_cmp_ tests = [loader.suiteClass([Foo('test_2'), Foo('test_1')])] self.assertEqual(list(loader.loadTestsFromModule(m)), tests) @@ -1138,9 +1132,6 @@ # "Function to be used to compare method names when sorting them in # getTestCaseNames() and all the loadTestsFromX() methods" def test_sortTestMethodsUsing__loadTestsFromName(self): -def reversed_cmp(x, y): -return -cmp(x, y) - m = types.ModuleType('m') class Foo(unittest2.TestCase): def test_1(self): pass @@ -1148,7 +1139,7 @@ m.Foo = Foo loader = unittest2.TestLoader() -loader.sortTestMethodsUsing = reversed_cmp +loader.sortTestMethodsUsing = unittest2.reversed_cmp_ tests = loader.suiteClass([Foo('test_2'), Foo('test_1')]) self.assertEqual(loader.loadTestsFromName('Foo', m), tests) @@ -1156,9 +1147,6 @@ # "Function to be used to compare method names when sorting them in # getTestCaseNames() and all the loadTestsFromX() methods" def test_sortTestMethodsUsing__loadTestsFromNames(self): -def reversed_cmp(x, y): -return -cmp(x, y) - m = types.ModuleType('m') class Foo(unittest2.TestCase): def test_1(self): pass @@ -1166,7 +1154,7 @@ m.Foo = Foo loader = unittest2.TestLoader() -loader.sortTestMethodsUsing = reversed_cmp +loader.sortTestMethodsUsing = unittest2.reversed_cmp_ tests = [loader.suiteClass([Foo('test_2'), Foo('test_1')])] self.assertEqual(list(loader.loadTestsFromNames(['Foo'], m)), tests) @@ -1176,15 +1164,12 @@ # # Does it actually affect getTestCaseNames()? def test_sortTestMethodsUsing__getTestCaseNames(self): -def reversed_cmp(x, y): -return -cmp(x, y) - class Foo(unittest2.TestCase): def test_1(self): pass def test_2(self): pass loader = unittest2.TestLoader() -loader.sortTestMethodsUsing = reversed_cmp +loader.sortTestMethodsUsing = unittest2.reversed_cmp_ test_names = ['test_2', 'test_1'] self.assertEqual(loader.getTestCaseNames(Foo), test_names) @@ -1192,7 +1177,7 @@ # "The default val
Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2
tfiala accepted this revision. tfiala added a comment. This revision is now accepted and ready to land. Looks reasonable. Do we know if it runs anywhere else yet? http://reviews.llvm.org/D14395 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14453: Python 3 - Fix some portability issues with class / instance attributes
tfiala accepted this revision. tfiala added a comment. This revision is now accepted and ready to land. LGTM. We just weren't using the reversed_cmp() code it seems? http://reviews.llvm.org/D14453 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2
zturner added a comment. I'm probably being dense. But do we know if what runs anywhere else? http://reviews.llvm.org/D14395 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13819: LLDBStandalone: Report nice errors on missing vars
tfiala accepted this revision. tfiala added a comment. This revision is now accepted and ready to land. Okay, this seems reasonable. http://reviews.llvm.org/D13819 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14453: Python 3 - Fix some portability issues with class / instance attributes
zturner added a comment. Derp, seems I uploaded this review twice. Now we have split threads. Anyway, there were a couple issues. The issue that was blocking me was related to the instance attributes. Specifically we were writing this: testMethodPrefix = 'test' suiteClass = suite.TestSuite sortTestMethodsUsing = cmp_ _top_level_dir = None instead of this: def __init__(self): self.testMethodPrefix = 'test' self.sortTestMethodsUsing = cmp_ self.testMethodPrefix = 'test' self._top_level_dir = None But we were still accessing the variables as `self.sortTestMethodsUsing`. I'm not sure how this works in 2.7, but for whatever reason, it doesn't work in 3.x. `sortTestMethodsUsing` is treated as a bound method here (i.e. instance method), so it expects a `self` argument. http://reviews.llvm.org/D14453 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14453: Python 3 - Fix some portability issues with class / instance attributes
zturner added a comment. The other issues with `reversed_cmp_` were still valid issues that I just fixed at the same time since they were related, but the main one was the instance / class attribute incompatibility. http://reviews.llvm.org/D14453 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.
brucem updated this revision to Diff 39558. brucem added a comment. Instead of simplifying, just remove. Expand scope of removal as well. http://reviews.llvm.org/D14415 Files: scripts/Python/buildSwigPython.py scripts/buildSwigWrapperClasses.py Index: scripts/buildSwigWrapperClasses.py === --- scripts/buildSwigWrapperClasses.py +++ scripts/buildSwigWrapperClasses.py @@ -80,7 +80,7 @@ automatically. Python install directory.\n\ --argsFile= The args are read from a file instead of the\n\ command line. Other command line args are ignored.\n\ ---swigExecutable= (optional) Full path of swig executable.\n\ +--swigExecutable= Full path of swig executable.\n\ \n\ Usage:\n\ buildSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath\n\ @@ -310,137 +310,6 @@ return (nResult, strStatusMsg) #++--- -# Details: Dummy function - system unknown. Function should not be called. -# Args: vDictArgs - (R) Program input parameters. -# Returns: Bool- False = Program logic error. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Unknown(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Unknown()") -# Do nothing -return (False, strMsgErrorOsTypeUnknown) - -#++--- -# Details: Locate the SWIG executable file in a Windows system. Several hard -# coded predetermined possible file path locations are searched. -# (This is good candidate for a derived class object) -# Args: vDictArgs - (W) Program input parameters. -# Returns: Bool- True = Success. -# - False = Failure file not found. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Windows(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Windows()") - -# Will always be true as it assumed the path to SWIG executable will be -# in the OS system environmental variable %PATH%. Easier this way as the -# user may have renamed the directory and or custom path installation. -bExeFileFound = True -vDictArgs["--swigExePath"] = "" -vDictArgs["--swigExeName"] = "swig.exe" -return (bExeFileFound, None) - -#++--- -# Details: Locate the SWIG executable file in a Linux system. Several hard -# coded predetermined possible file path locations are searched. -# (This is good candidate for a derived class object) -# Args: vDictArgs - (W) Program input parameters. -# Returns: Bool- True = Success. -# - False = Failure file not found. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Linux(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Linux()") -bExeFileFound = False - -strSwigExe = "swig" -strSwigExePath = "/usr/bin" -strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe)) -if os.path.isfile(strExe) and os.access(strExe, os.X_OK): -bExeFileFound = True -vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath) -vDictArgs["--swigExeName"] = strSwigExe -return (bExeFileFound, None) - -strSwigExePath = "/usr/local/bin" -strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe)) -if os.path.isfile(strExe) and os.access(strExe, os.X_OK): -bExeFileFound = True -vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath) -vDictArgs["--swigExeName"] = strSwigExe -return (bExeFileFound, None) - -return (bExeFileFound, strSwigExeFileNotFound) - -#++--- -# Details: Locate the SWIG executable file in a OSX system. Several hard -# coded predetermined possible file path locations are searched. -# (This is good candidate for a derived class object) -# Args: vDictArgs - (W) Program input parameters. -# Returns: Bool- True = Success. -# - False = Failure file not found. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Darwin(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Darwin()") -bExeFileFound = False -# ToDo: Find the SWIG executable and add the path to the args dictionary -#vDictArgs.["--swigExePath"] = "/usr/bin/swig" -strStatusMsg = "Sorry function 'check_lldb_swig_executable_file_exists_Darwin()' is not implemented" - -return (bExeFileFound, strStatusMsg) - -#++-
[Lldb-commits] [lldb] r252330 - [swig] Remove check_lldb_swig_executable_file_exists.
Author: brucem Date: Fri Nov 6 12:53:29 2015 New Revision: 252330 URL: http://llvm.org/viewvc/llvm-project?rev=252330&view=rev Log: [swig] Remove check_lldb_swig_executable_file_exists. Summary: Code that tried to find swig and then split the path into a separate path and filename is being removed. The invoking build system always provides the location of swig and we don't need to split it into 2 pieces only to recombine it a short time later. Reviewers: zturner, domipheus Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14415 Modified: lldb/trunk/scripts/Python/buildSwigPython.py lldb/trunk/scripts/buildSwigWrapperClasses.py Modified: lldb/trunk/scripts/Python/buildSwigPython.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/buildSwigPython.py?rev=252330&r1=252329&r2=252330&view=diff == --- lldb/trunk/scripts/Python/buildSwigPython.py (original) +++ lldb/trunk/scripts/Python/buildSwigPython.py Fri Nov 6 12:53:29 2015 @@ -44,8 +44,7 @@ strMsgFileNotExist = "\'%s\' could not b strErrMsgOsTypeUnknown = "Unable to determine current OS type" strMsgNotNeedUpdate = "Everything is up-to-date" strMsgSwigNeedRebuild = "SWIG needs to be re-run" -strErrMsgSwigParamsMissing = "This script was not passed either '--swigExePath \ -or the '--swigExeName' argument. Both are required." +strErrMsgSwigParamsMissing = "This script was not passed '--swigExecutable' as required." strMsgSwigExecute = "SWIG executing the following:\n\'%s'" strErrMsgSwigExecute = "SWIG failed: %s" strErrMsgPythonExecute = "Python script '%s' failed: %s" @@ -463,17 +462,9 @@ def do_swig_rebuild(vDictArgs, vstrSwigD strMsg = "" bDbg = "-d" in vDictArgs bGenDependencies = "-M" in vDictArgs -strSwigExePath = vDictArgs["--swigExePath"] -strSwigExeName = vDictArgs["--swigExeName"] +strSwig = vDictArgs["--swigExecutable"] strSrcRoot = vDictArgs["--srcRoot"] -# Build SWIG path to executable -if strSwigExePath != "": -strSwig = "%s/%s" % (strSwigExePath, strSwigExeName) -strSwig = os.path.normcase(strSwig) -else: -strSwig = strSwigExeName - strCfg = vstrCfgBldDir strOp = vstrSwigOpFile strIp = vstrSwigIpFile @@ -615,27 +606,24 @@ def do_modify_python_lldb(vDictArgs, vst Args: vDictArgs - (R) Map of parameter names to values. Used to for the the SWIG required parameters to create code. Note this container does get amended with more data. --d (optional) Determines whether or not this script -outputs additional information when running. --m (optional) Specify called from Makefile system. If given locate -the LLDBWrapPython.cpp in --srcRoot/source folder -else in the --targetDir folder. --M (optional) Specify want SWIG to generate a dependency file. ---srcRoot The root of the lldb source tree. ---targetDir Where the lldb framework/shared library gets put. ---cfgBldDir Where the buildSwigPythonLLDB.py program will -(optional) put the lldb.py file it generated from running -SWIG. ---prefixIs the root directory used to determine where -(optional) third-party modules for scripting languages should -be installed. Where non-Darwin systems want to put -the .py and .so files so that Python can find them -automatically. Python install directory. ---swigExePath File path the SWIG executable. (Determined and -passed by buildSwigWrapperClasses.py to here) ---swigExeName The file name of the SWIG executable. (Determined -and passed by buildSwigWrapperClasses.py to -here) +-d (optional)Determines whether or not this script + outputs additional information when running. +-m (optional)Specify called from Makefile system. If given locate + the LLDBWrapPython.cpp in --srcRoot/source folder + else in the --targetDir folder. +-M (optional)Specify want SWIG to generate a dependency file. +--srcRootThe root of the lldb source tree. +--targetDir Where the lldb framework/shared library gets put. +--cfgBldDir Where the buildSwigPythonLLDB.py program will +(optional) put the lldb.py file it generated from running + SWIG. +--prefix Is the root directory used to determine where +(optio
Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.
This revision was automatically updated to reflect the committed changes. Closed by commit rL252330: [swig] Remove check_lldb_swig_executable_file_exists. (authored by brucem). Changed prior to commit: http://reviews.llvm.org/D14415?vs=39558&id=39562#toc Repository: rL LLVM http://reviews.llvm.org/D14415 Files: lldb/trunk/scripts/Python/buildSwigPython.py lldb/trunk/scripts/buildSwigWrapperClasses.py Index: lldb/trunk/scripts/buildSwigWrapperClasses.py === --- lldb/trunk/scripts/buildSwigWrapperClasses.py +++ lldb/trunk/scripts/buildSwigWrapperClasses.py @@ -80,7 +80,7 @@ automatically. Python install directory.\n\ --argsFile= The args are read from a file instead of the\n\ command line. Other command line args are ignored.\n\ ---swigExecutable= (optional) Full path of swig executable.\n\ +--swigExecutable= Full path of swig executable.\n\ \n\ Usage:\n\ buildSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath\n\ @@ -310,137 +310,6 @@ return (nResult, strStatusMsg) #++--- -# Details: Dummy function - system unknown. Function should not be called. -# Args: vDictArgs - (R) Program input parameters. -# Returns: Bool- False = Program logic error. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Unknown(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Unknown()") -# Do nothing -return (False, strMsgErrorOsTypeUnknown) - -#++--- -# Details: Locate the SWIG executable file in a Windows system. Several hard -# coded predetermined possible file path locations are searched. -# (This is good candidate for a derived class object) -# Args: vDictArgs - (W) Program input parameters. -# Returns: Bool- True = Success. -# - False = Failure file not found. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Windows(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Windows()") - -# Will always be true as it assumed the path to SWIG executable will be -# in the OS system environmental variable %PATH%. Easier this way as the -# user may have renamed the directory and or custom path installation. -bExeFileFound = True -vDictArgs["--swigExePath"] = "" -vDictArgs["--swigExeName"] = "swig.exe" -return (bExeFileFound, None) - -#++--- -# Details: Locate the SWIG executable file in a Linux system. Several hard -# coded predetermined possible file path locations are searched. -# (This is good candidate for a derived class object) -# Args: vDictArgs - (W) Program input parameters. -# Returns: Bool- True = Success. -# - False = Failure file not found. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Linux(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Linux()") -bExeFileFound = False - -strSwigExe = "swig" -strSwigExePath = "/usr/bin" -strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe)) -if os.path.isfile(strExe) and os.access(strExe, os.X_OK): -bExeFileFound = True -vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath) -vDictArgs["--swigExeName"] = strSwigExe -return (bExeFileFound, None) - -strSwigExePath = "/usr/local/bin" -strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe)) -if os.path.isfile(strExe) and os.access(strExe, os.X_OK): -bExeFileFound = True -vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath) -vDictArgs["--swigExeName"] = strSwigExe -return (bExeFileFound, None) - -return (bExeFileFound, strSwigExeFileNotFound) - -#++--- -# Details: Locate the SWIG executable file in a OSX system. Several hard -# coded predetermined possible file path locations are searched. -# (This is good candidate for a derived class object) -# Args: vDictArgs - (W) Program input parameters. -# Returns: Bool- True = Success. -# - False = Failure file not found. -# Str - Error message. -# Throws: None. -#-- -def check_lldb_swig_executable_file_exists_Darwin(vDictArgs): -dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Darwin()") -bExeFileFound = False -# ToDo: Find the SWIG executable and add the path to the args dictionary -#vDictArgs.["--swigExeP
[Lldb-commits] [lldb] r252346 - Python 3 - Fix some issues with class / instance variables in unittest2.
Author: zturner Date: Fri Nov 6 15:37:07 2015 New Revision: 252346 URL: http://llvm.org/viewvc/llvm-project?rev=252346&view=rev Log: Python 3 - Fix some issues with class / instance variables in unittest2. Explanation from a Python wizard (not me) about why this exhibited different behavior under Python 2 and Python 3. `cmp` is a builtin_function_or_method in Python 2.7, which doesn't have a __get__ and doesn't qualify as a "descriptor". Your lambda is a regular function which qualifies as a descriptor whose __get__ method returns a bound instance. His suggested fix was to write sortTestMethodsUsing = staticmethod(cmp_) However, I don't think `sortTestMethodsUsing` (or any of the other fields of `TestLoader`) should be class attributes anyway. They are all accessed through self, so they should be instance attributes. So the fix employed here is to convert them to instance attributes. Differential Revision: http://reviews.llvm.org/D14453 Reviewed By: Todd Fiala Modified: lldb/trunk/third_party/Python/module/unittest2/unittest2/__init__.py lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py lldb/trunk/third_party/Python/module/unittest2/unittest2/test/test_loader.py Modified: lldb/trunk/third_party/Python/module/unittest2/unittest2/__init__.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/third_party/Python/module/unittest2/unittest2/__init__.py?rev=252346&r1=252345&r2=252346&view=diff == --- lldb/trunk/third_party/Python/module/unittest2/unittest2/__init__.py (original) +++ lldb/trunk/third_party/Python/module/unittest2/unittest2/__init__.py Fri Nov 6 15:37:07 2015 @@ -34,6 +34,8 @@ if sys.version_info[0] >= 3: else: cmp_ = cmp +reversed_cmp_ = lambda x, y: -cmp_(x,y) + __all__ = ['TestResult', 'TestCase', 'TestSuite', 'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main', 'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless', Modified: lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py?rev=252346&r1=252345&r2=252346&view=diff == --- lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py (original) +++ lldb/trunk/third_party/Python/module/unittest2/unittest2/loader.py Fri Nov 6 15:37:07 2015 @@ -1,5 +1,6 @@ """Loading unittests.""" +import functools import os import re import sys @@ -18,17 +19,6 @@ except ImportError: __unittest = True - -def _CmpToKey(mycmp): -'Convert a cmp= function into a key= function' -class K(object): -def __init__(self, obj): -self.obj = obj -def __lt__(self, other): -return mycmp(self.obj, other.obj) == -1 -return K - - # what about .pyc or .pyo (etc) # we would need to avoid loading the same tests multiple times # from '.py', '.pyc' *and* '.pyo' @@ -60,10 +50,12 @@ class TestLoader(unittest.TestLoader): This class is responsible for loading tests according to various criteria and returning them wrapped in a TestSuite """ -testMethodPrefix = 'test' -sortTestMethodsUsing = cmp_ -suiteClass = suite.TestSuite -_top_level_dir = None + +def __init__(self): +self.testMethodPrefix = 'test' +self.sortTestMethodsUsing = cmp_ +self.suiteClass = suite.TestSuite +self._top_level_dir = None def loadTestsFromTestCase(self, testCaseClass): """Return a suite of all tests cases contained in testCaseClass""" @@ -157,7 +149,7 @@ class TestLoader(unittest.TestLoader): hasattr(getattr(testCaseClass, attrname), '__call__') testFnNames = list(filter(isTestMethod, dir(testCaseClass))) if self.sortTestMethodsUsing: -testFnNames.sort(key=_CmpToKey(self.sortTestMethodsUsing)) + testFnNames.sort(key=functools.cmp_to_key(self.sortTestMethodsUsing)) return testFnNames def discover(self, start_dir, pattern='test*.py', top_level_dir=None): Modified: lldb/trunk/third_party/Python/module/unittest2/unittest2/test/test_loader.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/third_party/Python/module/unittest2/unittest2/test/test_loader.py?rev=252346&r1=252345&r2=252346&view=diff == --- lldb/trunk/third_party/Python/module/unittest2/unittest2/test/test_loader.py (original) +++ lldb/trunk/third_party/Python/module/unittest2/unittest2/test/test_loader.py Fri Nov 6 15:37:07 2015 @@ -1104,15 +1104,12 @@ class Test_TestLoader(unittest2.TestCase # "Function to be used to compare method names when sorting them in # getTestCaseNames() and all the loadTestsFromX() methods" def test_sortTestMethodsUsin
[Lldb-commits] [lldb] r252347 - Python 3 - Use the exec function, not the exec statement.
Author: zturner Date: Fri Nov 6 15:37:21 2015 New Revision: 252347 URL: http://llvm.org/viewvc/llvm-project?rev=252347&view=rev Log: Python 3 - Use the exec function, not the exec statement. exec statement is gone in Python 3, this version works in both. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py?rev=252347&r1=252346&r2=252347&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py Fri Nov 6 15:37:21 2015 @@ -1,3 +1,5 @@ -import lldbsuite.test.lldbinline as lldbinline +from __future__ import absolute_import + +from lldbsuite.test import lldbinline lldbinline.MakeInlineTest(__file__, globals(), [lldbinline.expectedFailureWindows("llvm.org/pr24663")]) Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py?rev=252347&r1=252346&r2=252347&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py Fri Nov 6 15:37:21 2015 @@ -141,7 +141,7 @@ class InlineTest(TestBase): self.do_test() def execute_user_command(self, __command): -exec __command in globals(), locals() +exec(__command, globals(), locals()) def do_test(self): exe_name = "a.out" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252348 - Python 3 - Port use of string.maketrans and don't use sets.Set.
Author: zturner Date: Fri Nov 6 15:37:33 2015 New Revision: 252348 URL: http://llvm.org/viewvc/llvm-project?rev=252348&view=rev Log: Python 3 - Port use of string.maketrans and don't use sets.Set. `sets.Set` has been deprecated in favor of `set` since 2.6, and `string.maketrans` has to be special cased. In Python 3 there is `str.maketrans`, `bytes.maketrans`, and `bytearray.maketrans` and you have to choose the correct one. So we need to introduce a runtime version check at this site. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252348&r1=252347&r2=252348&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Nov 6 15:37:33 2015 @@ -1726,8 +1726,10 @@ def run_suite(): if iterArchs or iterCompilers: # Translate ' ' to '-' for pathname component. -from string import maketrans -tbl = maketrans(' ', '-') +if six.PY2: +tbl = string.maketrans(' ', '-') +else: +tbl = str.maketrans(' ', '-') configPostfix = configString.translate(tbl) # Check whether we need to split stderr/stdout into configuration Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py?rev=252348&r1=252347&r2=252348&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py Fri Nov 6 15:37:33 2015 @@ -13,7 +13,6 @@ import platform import random import re import select -import sets import signal import socket import subprocess @@ -785,7 +784,7 @@ class GdbRemoteTestCaseBase(TestBase): def select_modifiable_register(self, reg_infos): """Find a register that can be read/written freely.""" -PREFERRED_REGISTER_NAMES = sets.Set(["rax",]) +PREFERRED_REGISTER_NAMES = set(["rax",]) # First check for the first register from the preferred register name set. alternative_register_index = None ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2
tfiala added a comment. I meant I looked at it but didn't try to run it (on Linux or OS X), and was wondering if you had tried to run it on a non-Windows platform. http://reviews.llvm.org/D14395 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2
Ahh, no sorry. There's nothing platform specific in the patch though, so I don't anticipate any problems on that front. I did run it under 2.7 and it worked, so I expect it will run under 2.7 on other platforms. On Fri, Nov 6, 2015 at 1:42 PM Todd Fiala wrote: > tfiala added a comment. > > I meant I looked at it but didn't try to run it (on Linux or OS X), and > was wondering if you had tried to run it on a non-Windows platform. > > > http://reviews.llvm.org/D14395 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252351 - Fixed a problem where a test case referred to a
Author: spyffe Date: Fri Nov 6 16:05:47 2015 New Revision: 252351 URL: http://llvm.org/viewvc/llvm-project?rev=252351&view=rev Log: Fixed a problem where a test case referred to a wrongly-capitalized header. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m?rev=252351&r1=252350&r2=252351&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m Fri Nov 6 16:05:47 2015 @@ -1,5 +1,5 @@ #import -#import "MyClass.h" +#import "myclass.h" @implementation MyClass { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252353 - Fix Linux tests after r252348.
Author: chaoren Date: Fri Nov 6 16:30:30 2015 New Revision: 252353 URL: http://llvm.org/viewvc/llvm-project?rev=252353&view=rev Log: Fix Linux tests after r252348. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252353&r1=252352&r2=252353&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Nov 6 16:30:30 2015 @@ -1727,6 +1727,7 @@ def run_suite(): if iterArchs or iterCompilers: # Translate ' ' to '-' for pathname component. if six.PY2: +import string tbl = string.maketrans(' ', '-') else: tbl = str.maketrans(' ', '-') ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r252353 - Fix Linux tests after r252348.
Thanks, sorry about that. On Fri, Nov 6, 2015 at 2:32 PM Chaoren Lin via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: chaoren > Date: Fri Nov 6 16:30:30 2015 > New Revision: 252353 > > URL: http://llvm.org/viewvc/llvm-project?rev=252353&view=rev > Log: > Fix Linux tests after r252348. > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/dotest.py > > Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252353&r1=252352&r2=252353&view=diff > > == > --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) > +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Nov 6 > 16:30:30 2015 > @@ -1727,6 +1727,7 @@ def run_suite(): > if iterArchs or iterCompilers: > # Translate ' ' to '-' for pathname component. > if six.PY2: > +import string > tbl = string.maketrans(' ', '-') > else: > tbl = str.maketrans(' ', '-') > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252354 - Fixed another issue with wrong case in #import.
Author: spyffe Date: Fri Nov 6 16:43:55 2015 New Revision: 252354 URL: http://llvm.org/viewvc/llvm-project?rev=252354&view=rev Log: Fixed another issue with wrong case in #import. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m?rev=252354&r1=252353&r2=252354&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/repro.m Fri Nov 6 16:43:55 2015 @@ -1,5 +1,5 @@ #import -#import "MyClass.h" +#import "myclass.h" int main() { id object = [MyClass new]; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252355 - Another optimization to keep down gdb-remote traffic. If we have suspended a thread while
Author: jingham Date: Fri Nov 6 16:45:57 2015 New Revision: 252355 URL: http://llvm.org/viewvc/llvm-project?rev=252355&view=rev Log: Another optimization to keep down gdb-remote traffic. If we have suspended a thread while running, don't request the thread status when deciding why we stopped. Modified: lldb/trunk/include/lldb/Target/Thread.h lldb/trunk/source/Target/Thread.cpp lldb/trunk/source/Target/ThreadList.cpp Modified: lldb/trunk/include/lldb/Target/Thread.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Thread.h?rev=252355&r1=252354&r2=252355&view=diff == --- lldb/trunk/include/lldb/Target/Thread.h (original) +++ lldb/trunk/include/lldb/Target/Thread.h Fri Nov 6 16:45:57 2015 @@ -1320,6 +1320,12 @@ protected: GetStackFrameList (); void +SetTemporaryResumeState(lldb::StateType new_state) +{ +m_temporary_resume_state = new_state; +} + +void FunctionOptimizationWarning (lldb_private::StackFrame *frame); //-- Modified: lldb/trunk/source/Target/Thread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=252355&r1=252354&r2=252355&view=diff == --- lldb/trunk/source/Target/Thread.cpp (original) +++ lldb/trunk/source/Target/Thread.cpp Fri Nov 6 16:45:57 2015 @@ -726,14 +726,17 @@ Thread::ShouldResume (StateType resume_s m_discarded_plan_stack.clear(); m_override_should_notify = eLazyBoolCalculate; -m_temporary_resume_state = resume_state; +StateType prev_resume_state = GetTemporaryResumeState(); + +SetTemporaryResumeState(resume_state); lldb::ThreadSP backing_thread_sp (GetBackingThread ()); if (backing_thread_sp) -backing_thread_sp->m_temporary_resume_state = resume_state; +backing_thread_sp->SetTemporaryResumeState(resume_state); -// Make sure m_stop_info_sp is valid -GetPrivateStopInfo(); +// Make sure m_stop_info_sp is valid. Don't do this for threads we suspended in the previous run. +if (prev_resume_state != eStateSuspended) +GetPrivateStopInfo(); // This is a little dubious, but we are trying to limit how often we actually fetch stop info from // the target, 'cause that slows down single stepping. So assume that if we got to the point where Modified: lldb/trunk/source/Target/ThreadList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=252355&r1=252354&r2=252355&view=diff == --- lldb/trunk/source/Target/ThreadList.cpp (original) +++ lldb/trunk/source/Target/ThreadList.cpp Fri Nov 6 16:45:57 2015 @@ -257,7 +257,20 @@ ThreadList::ShouldStop (Event *event_ptr Mutex::Locker locker(GetMutex()); m_process->UpdateThreadListIfNeeded(); -threads_copy = m_threads; +for (lldb::ThreadSP thread_sp : m_threads) +{ +// This is an optimization... If we didn't let a thread run in between the previous stop and this +// one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to +// inspect. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +threads_copy.push_back(thread_sp); +} + +// It is possible the threads we were allowing to run all exited and then maybe the user interrupted +// or something, then fall back on looking at all threads: + +if (threads_copy.size() == 0) +threads_copy = m_threads; } collection::iterator pos, end = threads_copy.end(); @@ -265,7 +278,10 @@ ThreadList::ShouldStop (Event *event_ptr if (log) { log->PutCString(""); -log->Printf ("ThreadList::%s: %" PRIu64 " threads", __FUNCTION__, (uint64_t)m_threads.size()); +log->Printf ("ThreadList::%s: %" PRIu64 " threads, %" PRIu64 " unsuspended threads", + __FUNCTION__, + (uint64_t)m_threads.size(), + (uint64_t)threads_copy.size()); } bool did_anybody_stop_for_a_reason = false; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252356 - Make the language specifier to "break set" actually filter the names by their language. So for
Author: jingham Date: Fri Nov 6 16:48:59 2015 New Revision: 252356 URL: http://llvm.org/viewvc/llvm-project?rev=252356&view=rev Log: Make the language specifier to "break set" actually filter the names by their language. So for instance: break set -l c++ -r Name will only break on C++ symbols that match Name, not ObjC or plain C symbols. This also works for "break set -n" and there are SB API's to pass this as well. Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/a.c lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/b.cpp lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/main.cpp Modified: lldb/trunk/include/lldb/API/SBTarget.h lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h lldb/trunk/include/lldb/Target/LanguageRuntime.h lldb/trunk/include/lldb/Target/Target.h lldb/trunk/scripts/interface/SBTarget.i lldb/trunk/source/API/SBTarget.cpp lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp lldb/trunk/source/Target/LanguageRuntime.cpp lldb/trunk/source/Target/Target.cpp Modified: lldb/trunk/include/lldb/API/SBTarget.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=252356&r1=252355&r2=252356&view=diff == --- lldb/trunk/include/lldb/API/SBTarget.h (original) +++ lldb/trunk/include/lldb/API/SBTarget.h Fri Nov 6 16:48:59 2015 @@ -636,20 +636,41 @@ public: const SBFileSpecList &comp_unit_list); lldb::SBBreakpoint +BreakpointCreateByName (const char *symbol_name, +uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits +lldb::LanguageType symbol_language, +const SBFileSpecList &module_list, +const SBFileSpecList &comp_unit_list); + +lldb::SBBreakpoint +BreakpointCreateByNames (const char *symbol_name[], + uint32_t num_names, + uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits + const SBFileSpecList &module_list, + const SBFileSpecList &comp_unit_list); + +lldb::SBBreakpoint BreakpointCreateByNames (const char *symbol_name[], uint32_t num_names, uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits + lldb::LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list); lldb::SBBreakpoint -BreakpointCreateByRegex(const char *symbol_name_regex, const char *module_name = nullptr); +BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = nullptr); lldb::SBBreakpoint BreakpointCreateByRegex (const char *symbol_name_regex, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list); +lldb::SBBreakpoint +BreakpointCreateByRegex (const char *symbol_name_regex, + lldb::LanguageType symbol_language, + const SBFileSpecList &module_list, + const SBFileSpecList &comp_unit_list); + lldb::SBBreakpoint BreakpointCreateBySourceRegex(const char *source_regex, const SBFileSpec &source_file, Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h?rev=252356&r1=252355&r2=252356&view=diff == --- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h (original) +++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h Fri Nov 6 16:48:59 2015 @@ -57,6 +57,7 @@ public: // Creates a function breakpoint by regular expression. Takes over control of the lifespan of func_regex. BreakpointResolverName (Breakpoint *bkpt, RegularExpression &func_regex, +lldb::LanguageType language, bool skip_prologue); BreakpointResolver
Re: [Lldb-commits] [PATCH] D14163: Address another race condition running tests on Windows
amccarth added a comment. I'm not seeing this problem now that many of the other changes are in. I'm going to hold off until I see it again. http://reviews.llvm.org/D14163 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb
joerg accepted this revision. joerg added a reviewer: joerg. joerg added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM http://reviews.llvm.org/D14042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252374 - Fix some Clang-tidy warnings and formatting in recently added code.
Author: eugenezelenko Date: Fri Nov 6 18:28:50 2015 New Revision: 252374 URL: http://llvm.org/viewvc/llvm-project?rev=252374&view=rev Log: Fix some Clang-tidy warnings and formatting in recently added code. Fixed Clang-tidy warnings: * modernize-use-override; * modernize-use-nullptr; * modernize-use-default; * readability-simplify-boolean-expr. Modified: lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.h lldb/trunk/source/Plugins/Language/Go/GoFormatterFunctions.cpp lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h Modified: lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp?rev=252374&r1=252373&r2=252374&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp Fri Nov 6 18:28:50 2015 @@ -1,4 +1,4 @@ -//===-- GoUserExpression.cpp -*- C++ -*-===// +//===-- GoUserExpression.cpp *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,16 +7,23 @@ // //===--===// +// C Includes #include #if HAVE_SYS_TYPES_H #include #endif +// C++ Includes #include +#include #include -#include #include +// Other libraries and framework includes +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/StringMap.h" + +// Project includes #include "GoUserExpression.h" #include "lldb/lldb-private.h" @@ -41,8 +48,6 @@ #include "lldb/Target/Target.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringMap.h" #include "Plugins/ExpressionParser/Go/GoAST.h" #include "Plugins/ExpressionParser/Go/GoParser.h" @@ -86,6 +91,7 @@ class GoUserExpression::GoInterpreter m_parser.GetError(m_error); return nullptr; } + ValueObjectSP VisitParenExpr(const GoASTParenExpr *e); ValueObjectSP VisitIdent(const GoASTIdent *e); ValueObjectSP VisitStarExpr(const GoASTStarExpr *e); @@ -94,66 +100,79 @@ class GoUserExpression::GoInterpreter ValueObjectSP VisitIndexExpr(const GoASTIndexExpr *e); ValueObjectSP VisitUnaryExpr(const GoASTUnaryExpr *e); ValueObjectSP VisitCallExpr(const GoASTCallExpr *e); + ValueObjectSP VisitTypeAssertExpr(const GoASTTypeAssertExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitBinaryExpr(const GoASTBinaryExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitArrayType(const GoASTArrayType *e) { return NotImplemented(e); } + ValueObjectSP VisitChanType(const GoASTChanType *e) { return NotImplemented(e); } + ValueObjectSP VisitCompositeLit(const GoASTCompositeLit *e) { return NotImplemented(e); } + ValueObjectSP VisitEllipsis(const GoASTEllipsis *e) { return NotImplemented(e); } + ValueObjectSP VisitFuncType(const GoASTFuncType *e) { return NotImplemented(e); } + ValueObjectSP VisitFuncLit(const GoASTFuncLit *e) { return NotImplemented(e); } + ValueObjectSP VisitInterfaceType(const GoASTInterfaceType *e) { return NotImplemented(e); } + ValueObjectSP VisitKeyValueExpr(const GoASTKeyValueExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitMapType(const GoASTMapType *e) { return NotImplemented(e); } + ValueObjectSP VisitSliceExpr(const GoASTSliceExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitStructType(const GoASTStructType *e) { @@ -217,6 +236,7 @@ LookupType(TargetSP target, ConstString } return CompilerType(); } + GoUserExpression::GoUserExpression(ExecutionContextScope &exe_scope, const char *expr, const char *expr_prefix, lldb::LanguageType language, ResultType desired_type, const EvaluateExpressionOptions &options) @@ -531,7 +551,7 @@ GoUserExpression::GoInterpreter::VisitBa return nullptr; } errno = 0; -int64_t intvalue = strtol(value.c
[Lldb-commits] [lldb] r252378 - lldb/ADT: Remove implicit ilist iterator conversions, NFC
Author: dexonsmith Date: Fri Nov 6 18:54:13 2015 New Revision: 252378 URL: http://llvm.org/viewvc/llvm-project?rev=252378&view=rev Log: lldb/ADT: Remove implicit ilist iterator conversions, NFC Remove implicit ilist iterator conversions before reapplying r252372 (which will disallow them). Modified: lldb/trunk/source/Expression/IRInterpreter.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Modified: lldb/trunk/source/Expression/IRInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=252378&r1=252377&r2=252378&view=diff == --- lldb/trunk/source/Expression/IRInterpreter.cpp (original) +++ lldb/trunk/source/Expression/IRInterpreter.cpp Fri Nov 6 18:54:13 2015 @@ -498,7 +498,7 @@ IRInterpreter::CanInterpret (llvm::Modul default: { if (log) -log->Printf("Unsupported instruction: %s", PrintValue(ii).c_str()); +log->Printf("Unsupported instruction: %s", PrintValue(&*ii).c_str()); error.SetErrorToGenericError(); error.SetErrorString(unsupported_opcode_error); return false; @@ -522,7 +522,7 @@ IRInterpreter::CanInterpret (llvm::Modul if (!CanIgnoreCall(call_inst) && !support_function_calls) { if (log) -log->Printf("Unsupported instruction: %s", PrintValue(ii).c_str()); +log->Printf("Unsupported instruction: %s", PrintValue(&*ii).c_str()); error.SetErrorToGenericError(); error.SetErrorString(unsupported_opcode_error); return false; @@ -547,7 +547,7 @@ IRInterpreter::CanInterpret (llvm::Modul default: { if (log) -log->Printf("Unsupported ICmp predicate: %s", PrintValue(ii).c_str()); +log->Printf("Unsupported ICmp predicate: %s", PrintValue(&*ii).c_str()); error.SetErrorToGenericError(); error.SetErrorString(unsupported_opcode_error); @@ -663,16 +663,16 @@ IRInterpreter::Interpret (llvm::Module & lldb::addr_t ptr = args[arg_index]; -frame.MakeArgument(ai, ptr); +frame.MakeArgument(&*ai, ptr); } uint32_t num_insts = 0; -frame.Jump(function.begin()); +frame.Jump(&function.front()); while (frame.m_ii != frame.m_ie && (++num_insts < 4096)) { -const Instruction *inst = frame.m_ii; +const Instruction *inst = &*frame.m_ii; if (log) log->Printf("Interpreting %s", PrintValue(inst).c_str()); Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=252378&r1=252377&r2=252378&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Fri Nov 6 18:54:13 2015 @@ -338,7 +338,7 @@ IRForTarget::ResolveFunctionPointers(llv fi != llvm_module.end(); ++fi) { -Function *fun = fi; +Function *fun = &*fi; bool is_decl = fun->isDeclaration(); @@ -1955,7 +1955,7 @@ IRForTarget::ReplaceStaticLiterals (llvm if (operand_constant_fp/* && operand_constant_fp->getType()->isX86_FP80Ty()*/) { static_constants.push_back(operand_val); -static_users.push_back(ii); +static_users.push_back(&*ii); } } } @@ -2280,7 +2280,7 @@ IRForTarget::ReplaceVariables (Function return false; } -Argument *argument = iter; +Argument *argument = &*iter; if (argument->getName().equals("this")) { @@ -2294,7 +2294,7 @@ IRForTarget::ReplaceVariables (Function return false; } -argument = iter; +argument = &*iter; } else if (argument->getName().equals("self")) { @@ -2326,7 +2326,7 @@ IRForTarget::ReplaceVariables (Function return false; } -argument = iter; +argument = &*iter; } if (!argument->getName().equals("$__lldb_arg")) @@ -2624,7 +2624,7 @@ IRForTarget::runOnModule (Module &llvm_m fi != fe; ++fi) { -llvm::Function *function = fi; +llvm::Function *function = &*fi; if (function->begin() == function->end()) continue; @@ -2699,7 +2699,7 @@ IRForTarget::runOnModule (Module &llvm_m fi != fe; ++fi) {
[Lldb-commits] [lldb] r252382 - Python 3 - Use __bool__() instead of __nonzero__() for truthiness.
Author: zturner Date: Fri Nov 6 19:08:25 2015 New Revision: 252382 URL: http://llvm.org/viewvc/llvm-project?rev=252382&view=rev Log: Python 3 - Use __bool__() instead of __nonzero__() for truthiness. Python has a complicated mechanism of checking an objects truthity. This involves a number of steps, which end with calling two private methods on an object (if they are implemented). In Python 2 these two methods are `__nonzero__` and `__len__`, and in Python 3 they are `__bool__` and `__len__`. Because we *also* define a __len__ method for certain iterable types, this was triggering a situation in Python 3 where `__nonzero__` wasn't defined, so it was calling `__len__`, which was returning 0 (for example an SBDebugger with no targets), and as a result the truthosity was determined to be False. We fix this by correctly using ` __bool__` for Python 3, and leave the behavior under Python 2 unchanged. Note that this fix is only implemented in the SWIG generation python script, and not the SWIG generation shell script. Someone more familiar than me with shell scripts will need to fix them to support this for Python 3 if desired. Added: lldb/trunk/scripts/Python/use_lldb_suite.py lldb/trunk/scripts/use_lldb_suite.py Modified: lldb/trunk/scripts/CMakeLists.txt lldb/trunk/scripts/Python/modify-python-lldb.py Modified: lldb/trunk/scripts/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/CMakeLists.txt?rev=252382&r1=252381&r2=252382&view=diff == --- lldb/trunk/scripts/CMakeLists.txt (original) +++ lldb/trunk/scripts/CMakeLists.txt Fri Nov 6 19:08:25 2015 @@ -15,7 +15,8 @@ add_custom_command( DEPENDS ${SWIG_SOURCES} DEPENDS ${SWIG_INTERFACES} DEPENDS ${SWIG_HEADERS} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/buildSwigPython.py + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/modify-python-lldb.py COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py "--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" "--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" "--swigExecutable=${SWIG_EXECUTABLE}" -m COMMENT "Python script building LLDB Python wrapper") set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp PROPERTIES GENERATED 1) Modified: lldb/trunk/scripts/Python/modify-python-lldb.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modify-python-lldb.py?rev=252382&r1=252381&r2=252382&view=diff == --- lldb/trunk/scripts/Python/modify-python-lldb.py (original) +++ lldb/trunk/scripts/Python/modify-python-lldb.py Fri Nov 6 19:08:25 2015 @@ -21,12 +21,21 @@ # subsystem. # +# System modules import sys, re if sys.version_info.major >= 3: import io as StringIO else: import StringIO +# import use_lldb_suite so we can find third-party and helper modules +import use_lldb_suite + +# Third party modules +import six + +# LLDB modules + if len(sys.argv) != 2: output_name = "./lldb.py" else: @@ -190,9 +199,15 @@ eq_def = "def __eq__(self, other): r ne_def = "def __ne__(self, other): return not self.__eq__(other)" # Called to implement truth value testing and the built-in operation bool(); +# Note that Python 2 uses __nonzero__(), whereas Python 3 uses __bool__() # should return False or True, or their integer equivalents 0 or 1. # Delegate to self.IsValid() if it is defined for the current lldb object. -nonzero_def = "def __nonzero__(self): return self.IsValid()" + +if six.PY2: +print("Test") +nonzero_def = "def __nonzero__(self): return self.IsValid()" +else: +nonzero_def = "def __bool__(self): return self.IsValid()" # A convenience iterator for SBSymbol! symbol_in_section_iter_def = ''' Added: lldb/trunk/scripts/Python/use_lldb_suite.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/use_lldb_suite.py?rev=252382&view=auto == --- lldb/trunk/scripts/Python/use_lldb_suite.py (added) +++ lldb/trunk/scripts/Python/use_lldb_suite.py Fri Nov 6 19:08:25 2015 @@ -0,0 +1,22 @@ +import inspect +import os +import sys + +def find_lldb_root(): +lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe())) +while True: +lldb_root = os.path.dirname(lldb_root) +if lldb_root is None: +return None + +test_path = os.path.join(lldb_root, "lldb.root") +if os.path.isfile(test_path): +return lldb_root +return None + +lldb_root = find_lldb_root() +if lldb_root is not None: +import imp +module = imp.find_module("use_lldb_suite_root", [lldb_root]) +if module is not None: +imp.load_module("use_lldb_suite_root",
[Lldb-commits] [lldb] r252381 - Python 3 - Don't use unbuffered I/O in text mode.
Author: zturner Date: Fri Nov 6 19:08:15 2015 New Revision: 252381 URL: http://llvm.org/viewvc/llvm-project?rev=252381&view=rev Log: Python 3 - Don't use unbuffered I/O in text mode. This is unsupported in Python 3. This could also have been fixed by using "wb" instead of "w", but it doesn't seem like writing the session log absolutely *needs* to be unbuffered. Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py 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=252381&r1=252380&r2=252381&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov 6 19:08:15 2015 @@ -1413,8 +1413,8 @@ class Base(unittest2.TestCase): self.log_basename = self.getLogBasenameForCurrentTest() session_file = "{}.log".format(self.log_basename) -unbuffered = 0 # 0 is the constant for unbuffered -self.session = open(session_file, "w", unbuffered) +# Python 3 doesn't support unbuffered I/O in text mode. Open buffered. +self.session = open(session_file, "w") # Optimistically set __errored__, __failed__, __expected__ to False # initially. If the test errored/failed, the session info ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252384 - Remove a debug print statement.
Author: zturner Date: Fri Nov 6 19:12:53 2015 New Revision: 252384 URL: http://llvm.org/viewvc/llvm-project?rev=252384&view=rev Log: Remove a debug print statement. Modified: lldb/trunk/scripts/Python/modify-python-lldb.py Modified: lldb/trunk/scripts/Python/modify-python-lldb.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modify-python-lldb.py?rev=252384&r1=252383&r2=252384&view=diff == --- lldb/trunk/scripts/Python/modify-python-lldb.py (original) +++ lldb/trunk/scripts/Python/modify-python-lldb.py Fri Nov 6 19:12:53 2015 @@ -204,7 +204,6 @@ ne_def = "def __ne__(self, other): r # Delegate to self.IsValid() if it is defined for the current lldb object. if six.PY2: -print("Test") nonzero_def = "def __nonzero__(self): return self.IsValid()" else: nonzero_def = "def __bool__(self): return self.IsValid()" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.
chaoren created this revision. chaoren added reviewers: sivachandra, jingham. chaoren added a subscriber: lldb-commits. On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the previous stop. http://reviews.llvm.org/D14472 Files: source/Target/ThreadList.cpp Index: source/Target/ThreadList.cpp === --- source/Target/ThreadList.cpp +++ source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } Index: source/Target/ThreadList.cpp === --- source/Target/ThreadList.cpp +++ source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r252390 - Add SBType::IsAnonymousType() and relative plumbing in the debugger internals
Author: enrico Date: Fri Nov 6 20:06:57 2015 New Revision: 252390 URL: http://llvm.org/viewvc/llvm-project?rev=252390&view=rev Log: Add SBType::IsAnonymousType() and relative plumbing in the debugger internals For language that support such a thing, this API allows to ask whether a type is anonymous (i.e. has been given no name) Comes with test case Modified: lldb/trunk/include/lldb/API/SBType.h lldb/trunk/include/lldb/Symbol/ClangASTContext.h lldb/trunk/include/lldb/Symbol/CompilerType.h lldb/trunk/include/lldb/Symbol/TypeSystem.h lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py lldb/trunk/packages/Python/lldbsuite/test/python_api/type/main.cpp lldb/trunk/scripts/interface/SBType.i lldb/trunk/source/API/SBType.cpp lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/CompilerType.cpp lldb/trunk/source/Symbol/TypeSystem.cpp Modified: lldb/trunk/include/lldb/API/SBType.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=252390&r1=252389&r2=252390&view=diff == --- lldb/trunk/include/lldb/API/SBType.h (original) +++ lldb/trunk/include/lldb/API/SBType.h Fri Nov 6 20:06:57 2015 @@ -158,6 +158,9 @@ public: bool IsTypedefType (); +bool +IsAnonymousType (); + lldb::SBType GetPointerType(); Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=252390&r1=252389&r2=252390&view=diff == --- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Fri Nov 6 20:06:57 2015 @@ -606,6 +606,9 @@ public: IsAggregateType (lldb::opaque_compiler_type_t type) override; bool +IsAnonymousType (lldb::opaque_compiler_type_t type) override; + +bool IsBeingDefined (lldb::opaque_compiler_type_t type) override; bool Modified: lldb/trunk/include/lldb/Symbol/CompilerType.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompilerType.h?rev=252390&r1=252389&r2=252390&view=diff == --- lldb/trunk/include/lldb/Symbol/CompilerType.h (original) +++ lldb/trunk/include/lldb/Symbol/CompilerType.h Fri Nov 6 20:06:57 2015 @@ -107,6 +107,9 @@ public: IsAggregateType () const; bool +IsAnonymousType () const; + +bool IsBeingDefined () const; bool Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=252390&r1=252389&r2=252390&view=diff == --- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original) +++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Fri Nov 6 20:06:57 2015 @@ -153,6 +153,9 @@ public: virtual bool IsAggregateType (lldb::opaque_compiler_type_t type) = 0; + +virtual bool +IsAnonymousType (lldb::opaque_compiler_type_t type); virtual bool IsCharType (lldb::opaque_compiler_type_t type) = 0; Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py?rev=252390&r1=252389&r2=252390&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py Fri Nov 6 20:06:57 2015 @@ -59,11 +59,16 @@ class TypeAndTypeListTestCase(TestBase): for type in type_list: self.assertTrue(type) self.DebugSBType(type) +self.assertFalse(type.IsAnonymousType(), "Task is not anonymous") for field in type.fields: if field.name == "type": for enum_member in field.type.enum_members: self.assertTrue(enum_member) self.DebugSBType(enum_member.type) +elif field.name == "my_type_is_nameless": +self.assertTrue(field.type.IsAnonymousType(), "my_type_is_nameless has an anonymous type") +elif field.name == "my_type_is_named": +self.assertFalse(field.type.IsAnonymousType(), "my_type_is_named has a named type") # Pass an empty string. LLDB should not crash. :-) fuzz_types = target.FindTypes(None) Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/type/main.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_a
[Lldb-commits] [lldb] r252391 - Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.
Author: chaoren Date: Fri Nov 6 20:16:31 2015 New Revision: 252391 URL: http://llvm.org/viewvc/llvm-project?rev=252391&view=rev Log: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355. Summary: On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the previous stop. Reviewers: sivachandra, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14472 Modified: lldb/trunk/source/Target/ThreadList.cpp Modified: lldb/trunk/source/Target/ThreadList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=252391&r1=252390&r2=252391&view=diff == --- lldb/trunk/source/Target/ThreadList.cpp (original) +++ lldb/trunk/source/Target/ThreadList.cpp Fri Nov 6 20:16:31 2015 @@ -262,7 +262,11 @@ ThreadList::ShouldStop (Event *event_ptr // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.
This revision was automatically updated to reflect the committed changes. Closed by commit rL252391: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355. (authored by chaoren). Changed prior to commit: http://reviews.llvm.org/D14472?vs=39615&id=39616#toc Repository: rL LLVM http://reviews.llvm.org/D14472 Files: lldb/trunk/source/Target/ThreadList.cpp Index: lldb/trunk/source/Target/ThreadList.cpp === --- lldb/trunk/source/Target/ThreadList.cpp +++ lldb/trunk/source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } Index: lldb/trunk/source/Target/ThreadList.cpp === --- lldb/trunk/source/Target/ThreadList.cpp +++ lldb/trunk/source/Target/ThreadList.cpp @@ -262,7 +262,11 @@ // This is an optimization... If we didn't let a thread run in between the previous stop and this // one, we shouldn't have to consult it for ShouldStop. So just leave it off the list we are going to // inspect. -if (thread_sp->GetTemporaryResumeState () != eStateSuspended) +// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread +// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit +// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the +// previous stop. +if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit()) threads_copy.push_back(thread_sp); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb
emaste accepted this revision. emaste added a comment. Fine by me. I'm not sure how we ended up with the Python-with-semicolons in scripts/buildSwigWrapperClasses.py (prior to this change) though. Repository: rL LLVM http://reviews.llvm.org/D14042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb
brucem added a comment. Kamil, please rebase forward and I'll land it. The semicolons in Python are gone now. And so is the need for that block of Python at all. Repository: rL LLVM http://reviews.llvm.org/D14042 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14417: Make lldb::endian::InlHostByteOrder() private.
This revision was automatically updated to reflect the committed changes. Closed by commit rL252396: Make lldb::endian::InlHostByteOrder() private. (authored by brucem). Changed prior to commit: http://reviews.llvm.org/D14417?vs=39473&id=39630#toc Repository: rL LLVM http://reviews.llvm.org/D14417 Files: lldb/trunk/include/lldb/Core/Opcode.h lldb/trunk/include/lldb/Core/RegisterValue.h lldb/trunk/include/lldb/Host/Endian.h lldb/trunk/source/Core/Address.cpp lldb/trunk/source/Core/DataEncoder.cpp lldb/trunk/source/Core/DataExtractor.cpp lldb/trunk/source/Core/Event.cpp lldb/trunk/source/Core/Opcode.cpp lldb/trunk/source/Core/Scalar.cpp lldb/trunk/source/Core/Stream.cpp lldb/trunk/source/Core/Value.cpp lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp lldb/trunk/source/Expression/IRInterpreter.cpp lldb/trunk/source/Host/freebsd/Host.cpp lldb/trunk/source/Host/macosx/Host.mm lldb/trunk/source/Host/netbsd/Host.cpp lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Target/ExecutionContext.cpp lldb/trunk/source/Target/RegisterContext.cpp Index: lldb/trunk/source/Target/ExecutionContext.cpp === --- lldb/trunk/source/Target/ExecutionContext.cpp +++ lldb/trunk/source/Target/ExecutionContext.cpp @@ -262,7 +262,7 @@ m_target_sp->GetArchitecture().GetByteOrder(); if (m_process_sp) m_process_sp->GetByteOrder(); -return lldb::endian::InlHostByteOrder(); +return endian::InlHostByteOrder(); } RegisterContext * Index: lldb/trunk/source/Target/RegisterContext.cpp === --- lldb/trunk/source/Target/RegisterContext.cpp +++ lldb/trunk/source/Target/RegisterContext.cpp @@ -571,31 +571,31 @@ //case 1: //{ //int8_t v; -//if (data.ExtractBytes (0, sizeof (int8_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int8_t)) +//if (data.ExtractBytes (0, sizeof (int8_t), endian::InlHostByteOrder(), &v) != sizeof (int8_t)) //return false; //value = v; //return true; //} //case 2: //{ //int16_t v; -//if (data.ExtractBytes (0, sizeof (int16_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int16_t)) +//if (data.ExtractBytes (0, sizeof (int16_t), endian::InlHostByteOrder(), &v) != sizeof (int16_t)) //return false; //value = v; //return true; //} //case 4: //{ //int32_t v; -//if (data.ExtractBytes (0, sizeof (int32_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int32_t)) +//if (data.ExtractBytes (0, sizeof (int32_t), endian::InlHostByteOrder(), &v) != sizeof (int32_t)) //return false; //value = v; //return true; //} //case 8: //{ //int64_t v; -//if (data.ExtractBytes (0, sizeof (int64_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int64_t)) +//if (data.ExtractBytes (0, sizeof (int64_t), endian::InlHostByteOrder(), &v) != sizeof (int64_t)) //return false; //value = v; //return true; @@ -608,23 +608,23 @@ //case sizeof (float): //{ //float v; -//if (data.ExtractBytes (0, sizeof (float), lldb::endian::InlHostByteOrder(), &v) != sizeof (float)) +//if (data.ExtractBytes (0, sizeof (float), endian::InlHostByteOrder(), &v) != sizeof (float)) //return false; //value = v; //return true; //} //case sizeof (double): //{ //double v; -//if (data.ExtractBytes (0, sizeof (double), lldb::endian::InlHostByteOrder(), &v) != sizeof (double)) +//if (data.ExtractBytes (0, sizeof (double), endian::InlHostByteOrder(), &v) != sizeof (dou
[Lldb-commits] [lldb] r252396 - Make lldb::endian::InlHostByteOrder() private.
Author: brucem Date: Fri Nov 6 22:40:13 2015 New Revision: 252396 URL: http://llvm.org/viewvc/llvm-project?rev=252396&view=rev Log: Make lldb::endian::InlHostByteOrder() private. Summary: Since this is within the lldb namespace, the compiler tries to export a symbol for it. Unfortunately, since it is inlined, the symbol is hidden and this results in a mess of warnings when building on OS X with cmake. Moving it to the lldb_private namespace eliminates that problem. Reviewers: clayborg Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D14417 Modified: lldb/trunk/include/lldb/Core/Opcode.h lldb/trunk/include/lldb/Core/RegisterValue.h lldb/trunk/include/lldb/Host/Endian.h lldb/trunk/source/Core/Address.cpp lldb/trunk/source/Core/DataEncoder.cpp lldb/trunk/source/Core/DataExtractor.cpp lldb/trunk/source/Core/Event.cpp lldb/trunk/source/Core/Opcode.cpp lldb/trunk/source/Core/Scalar.cpp lldb/trunk/source/Core/Stream.cpp lldb/trunk/source/Core/Value.cpp lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp lldb/trunk/source/Expression/IRInterpreter.cpp lldb/trunk/source/Host/freebsd/Host.cpp lldb/trunk/source/Host/macosx/Host.mm lldb/trunk/source/Host/netbsd/Host.cpp lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Target/ExecutionContext.cpp lldb/trunk/source/Target/RegisterContext.cpp Modified: lldb/trunk/include/lldb/Core/Opcode.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Opcode.h?rev=252396&r1=252395&r2=252396&view=diff == --- lldb/trunk/include/lldb/Core/Opcode.h (original) +++ lldb/trunk/include/lldb/Core/Opcode.h Fri Nov 6 22:40:13 2015 @@ -261,8 +261,8 @@ namespace lldb_private { bool GetEndianSwap() const { -return (m_byte_order == lldb::eByteOrderBig && lldb::endian::InlHostByteOrder() == lldb::eByteOrderLittle) || - (m_byte_order == lldb::eByteOrderLittle && lldb::endian::InlHostByteOrder() == lldb::eByteOrderBig); +return (m_byte_order == lldb::eByteOrderBig && endian::InlHostByteOrder() == lldb::eByteOrderLittle) || + (m_byte_order == lldb::eByteOrderLittle && endian::InlHostByteOrder() == lldb::eByteOrderBig); } lldb::ByteOrder m_byte_order; Modified: lldb/trunk/include/lldb/Core/RegisterValue.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RegisterValue.h?rev=252396&r1=252395&r2=252396&view=diff == --- lldb/trunk/include/lldb/Core/RegisterValue.h (original) +++ lldb/trunk/include/lldb/Core/RegisterValue.h Fri Nov 6 22:40:13 2015 @@ -365,7 +365,7 @@ namespace lldb_private { { if (m_type == eTypeBytes) return buffer.byte_order; -return lldb::endian::InlHostByteOrder(); +return endian::InlHostByteOrder(); } uint32_t Modified: lldb/trunk/include/lldb/Host/Endian.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Endian.h?rev=252396&r1=252395&r2=252396&view=diff == --- lldb/trunk/include/lldb/Host/Endian.h (original) +++ lldb/trunk/include/lldb/Host/Endian.h Fri Nov 6 22:40:13 2015 @@ -12,7 +12,7 @@ #include "lldb/lldb-enumerations.h" -namespace lldb { +namespace lldb_private { namespace endian { @@ -22,7 +22,7 @@ namespace endian { uint8_t bytes[sizeof(uint32_t)]; } const endianTest = { 0x01020304 }; -inline ByteOrder InlHostByteOrder() { return (ByteOrder)endianTest.bytes[0]; } +inline lldb::ByteOrder InlHostByteOrder() { return (lldb::ByteOrder)endianTest.bytes[0]; } //ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0]; } Modified: lldb/trunk/source/Core/Address.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=252396&r1=252395&r2=252396&view=diff ==