Re: [Lldb-commits] Buildbot numbers for week of 12/06/2015 - 12/12/2015
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 15.12.2015 20:23, Galina Kistanova via lldb-commits wrote: > Hello everyone, > > Below are some buildbot numbers for the last week of 12/06/2015 - > 12/12/2015. > > Thanks > > Galina > > > > Top 10 fastest builders(not docs): > > lldb-amd64-ninja-freebsd11 clang-bpf-build > llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast > libomp-gcc-x86_64-linux-debian sanitizer-windows llvm-hexagon-elf > libcxx-libcxxabi-x86_64-linux-ubuntu-cxx11 > libcxx-libcxxabi-singlethreaded-x86_64-linux-debian > libcxx-libcxxabi-x86_64-linux-debian-noexceptions > libcxx-libcxxabi-x86_64-linux-debian > > > 10 most slow builders: > > clang-native-arm-lnt-perf clang-atom-d525-fedora > clang-native-aarch64-full clang-cmake-thumbv7-a15-full-sh > clang-cmake-armv7-a15-selfhost-neon perf-x86_64-penryn-O3 > clang-cmake-mipsel perf-x86_64-penryn-O3-polly llvm-mips-linux > clang-cmake-armv7-a15-selfhost > > How these lists of 10 quickest and 10 slowest machines are helping out? Usual !x86 machines will be always slower than Intel architecture counter parts. More interesting will be coverage of the code by OS, Architecture, ABI, Instruction set etc. Personally I don't care if arm, mips, s390x or powerpc builds Clang in 1h or 12h - I'm happy they are there at all. > > Number of commits by project: > > project | commits > ---+--- llvm | > 258 lldb |90 cfe | > 89 compiler-rt |45 lld | > 21 libcxx| 6 polly | > 3 openmp| 3 clang-tools-extra | > 3 libcxxabi | 1 libunwind | > 1 --- 520 > > > Number of completed builds, failed builds and average build time > for successful builds per active builder: > > buildername | > completed | failed | time > ---+-- - --++ > > clang-aarch64-lnt | 51 > | 4 | 02:31:19 clang-atom-d525-fedora > | 15 || 08:58:01 clang-atom-d525-fedora-rel > | 49 | 2 | 02:21:40 clang-bpf-build > |272 | 12 | 00:03:10 clang-cmake-aarch64-42vma > |213 | 24 | 00:19:38 clang-cmake-aarch64-full > | 37 | 13 | 03:28:30 clang-cmake-aarch64-quick > |168 | 9 | 00:27:25 clang-cmake-armv7-a15 > |150 | 10 | 00:31:57 clang-cmake-armv7-a15-full > |118 | 1 | 00:50:50 clang-cmake-armv7-a15-selfhost > | 28 | 2 | 04:37:24 > clang-cmake-armv7-a15-selfhost-neon | > 21 | 2 | 06:17:58 clang-cmake-mips > | 82 | 12 | 01:32:08 clang-cmake-mipsel > | 12 | 1 | 06:00:38 clang-cmake-thumbv7-a15 > |161 | 8 | 00:31:53 > clang-cmake-thumbv7-a15-full-sh | > 11 || 06:39:48 clang-hexagon-elf > |206 | 72 | 00:17:15 clang-native-aarch64-full > | 18 | 6 | 07:34:46 clang-native-arm-lnt > | 44 || 01:15:44 clang-native-arm-lnt-perf > | 7 || 10:33:02 clang-ppc64-elf-linux > |100 | 7 | 01:04:00 clang-ppc64-elf-linux2 > | 72 | 3 | 01:33:52 clang-sphinx-docs > | 97 | 1 | 00:00:22 clang-x64-ninja-win7 > |150 | 36 | 00:35:55 clang-x86-win2008-selfhost > |102 | 17 | 01:03:28 > clang-x86_64-darwin13-cross-arm | > 200 || 00:20:02 clang-x86_64-darwin13-cross-mingw32 > |186 | 1 | 00:23:37 clang-x86_64-debian-fast > |119 | 7 | 00:12:34 clang-x86_64-linux-abi-test > |276 | 2 | 00:16:22 > clang-x86_64-linux-selfhost-modules | > 230 | 50 | 00:15:16 clang-x86_64-ubuntu-gdb-75 > |102 | 7 | 00:58:02 libcxx-libcxxabi-arm-linux > | 5 || 01:07:24 > libcxx-libcxxabi-singlethreaded-x86_64-linux-debian | > 5 || 00:08:22 libcxx-libcxxabi-x86_64-linux-debian > | 5 || 00:08:45 > libcxx-libcxxabi-x86_64-linux-debian-noexceptions | > 4 || 00:08:28 libcxx-libcxxabi-x86_64-linux-ubuntu-asan > | 5 || 00:14:23 > libcxx-libcxxabi-x86_64-linux-ubuntu-cxx03| > 5 || 00:09:01 > libcxx-libcxxabi-x86_64-linux-ubuntu-cxx11| > 5 || 00:08:08 > libcxx-libcxxabi-x86_64-linux-ubuntu-cxx14| > 6 || 00:09:43 > libcxx-libcxxabi-x86_64-linux-ubuntu-cxx1z| > 6 || 00:09:47 libcxx-libcxxabi-x86_64-linux-
Re: [Lldb-commits] [PATCH] D15530: [test] Add ability to expect timeouts
labath added a subscriber: labath. labath added a comment. No worries. I wanted to rename that function anyway, but then I forgot, so it's good that you have reminded me. :) http://reviews.llvm.org/D15530 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15530: [test] Add ability to expect timeouts
No worries. I wanted to rename that function anyway, but then I forgot, so it's good that you have reminded me. :) On 15 December 2015 at 22:18, Todd Fiala wrote: > tfiala added a comment. > > Hey Pavel, > > Change r255676 changed a few things that will require this patch to get > updated. I think the main code change will be that > ResultsFormatter._make_rerun_eligibility_key(self) has been renamed to > ResultsFormatter._make_key(self). I folded the BasicResultsFormatter class > into ResultsFormatter since any specialized results formatters still likely > want to display the results summary output at the end. That key is now used > in several places and they're not at all specific to rerun eligibility. > > The rest of the differences are likely just line number changes as the new > code here will just need to slide into different final spots in the now > top-of-tree version of result_formatter.py. > > Thanks, and sorry for the collision! > > > http://reviews.llvm.org/D15530 > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255763 - [test] Add ability to expect timeouts
Author: labath Date: Wed Dec 16 06:09:45 2015 New Revision: 255763 URL: http://llvm.org/viewvc/llvm-project?rev=255763&view=rev Log: [test] Add ability to expect timeouts Summary: This adds ability to mark test that do not complete due to hangs, crashes, etc., as "expected", to avoid flagging the build red for a known problem. Functionally, this extends the scope of the existing expectedFailureXXX decorators to cover these states as well. Once this is in, I will start replacing the magic list of failing tests in dosep.py with our regular annotations which should hopefully make code simpler. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15530 Modified: lldb/trunk/packages/Python/lldbsuite/test/dosep.py lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py lldb/trunk/packages/Python/lldbsuite/test/result_formatter.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=255763&r1=255762&r2=255763&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dosep.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dosep.py Wed Dec 16 06:09:45 2015 @@ -1143,7 +1143,6 @@ def getExpectedTimeouts(platform_name): target = m.group(1) expected_timeout = set() -expected_timeout.add("TestExpectedTimeout.py") if target.startswith("linux"): expected_timeout |= { Modified: lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park?rev=255763&r1=255762&r2=255763&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park (original) +++ lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park Wed Dec 16 06:09:45 2015 @@ -10,6 +10,7 @@ class ExpectedTimeoutTestCase(lldbtest.T """Forces test timeout.""" mydir = lldbtest.TestBase.compute_mydir(__file__) +@lldbtest.expectedFailureAll() def test_buildbot_sees_expected_timeout(self): """Tests that expected timeout logic kicks in and is picked up.""" while True: 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=255763&r1=255762&r2=255763&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Wed Dec 16 06:09:45 2015 @@ -598,6 +598,10 @@ def expectedFailure(expected_fn, bugnumb from unittest2 import case self = args[0] if expected_fn(self): +if configuration.results_formatter_object is not None: +# Mark this test as expected to fail. +configuration.results_formatter_object.handle_event( + EventBuilder.event_for_mark_test_expected_failure(self)) xfail_func = unittest2.expectedFailure(func) xfail_func(*args, **kwargs) else: Modified: lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py?rev=255763&r1=255762&r2=255763&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py Wed Dec 16 06:09:45 2015 @@ -165,6 +165,7 @@ class EventBuilder(object): TYPE_TEST_RESULT = "test_result" TYPE_TEST_START = "test_start" TYPE_MARK_TEST_RERUN_ELIGIBLE = "test_eligible_for_rerun" +TYPE_MARK_TEST_EXPECTED_FAILURE = "test_expected_failure" TYPE_SESSION_TERMINATE = "terminate" RESULT_TYPES = set([ @@ -528,6 +529,20 @@ class EventBuilder(object): return event @staticmethod +def event_for_mark_test_expected_failure(test): +"""Creates an event that indicates the specified test is expected +to fail. + +@param test the TestCase instance to which this pertains. + +@return an event that specifies the given test is expected to fail. +""" +event = EventBuilder._event_dictionary_common( +test, +EventBuilder.TYPE_MARK_TEST_EXPECTED_FAILURE) +return event + +@staticmethod def add_entries_to_all_events(entries_dict): ""
Re: [Lldb-commits] [PATCH] D15530: [test] Add ability to expect timeouts
This revision was automatically updated to reflect the committed changes. Closed by commit rL255763: [test] Add ability to expect timeouts (authored by labath). Changed prior to commit: http://reviews.llvm.org/D15530?vs=42858&id=42985#toc Repository: rL LLVM http://reviews.llvm.org/D15530 Files: lldb/trunk/packages/Python/lldbsuite/test/dosep.py lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py === --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py @@ -598,6 +598,10 @@ from unittest2 import case self = args[0] if expected_fn(self): +if configuration.results_formatter_object is not None: +# Mark this test as expected to fail. +configuration.results_formatter_object.handle_event( +EventBuilder.event_for_mark_test_expected_failure(self)) xfail_func = unittest2.expectedFailure(func) xfail_func(*args, **kwargs) else: Index: lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park === --- lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park +++ lldb/trunk/packages/Python/lldbsuite/test/issue_verification/TestExpectedTimeout.py.park @@ -10,6 +10,7 @@ """Forces test timeout.""" mydir = lldbtest.TestBase.compute_mydir(__file__) +@lldbtest.expectedFailureAll() def test_buildbot_sees_expected_timeout(self): """Tests that expected timeout logic kicks in and is picked up.""" while True: Index: lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py === --- lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py +++ lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py @@ -165,6 +165,7 @@ TYPE_TEST_RESULT = "test_result" TYPE_TEST_START = "test_start" TYPE_MARK_TEST_RERUN_ELIGIBLE = "test_eligible_for_rerun" +TYPE_MARK_TEST_EXPECTED_FAILURE = "test_expected_failure" TYPE_SESSION_TERMINATE = "terminate" RESULT_TYPES = set([ @@ -528,6 +529,20 @@ return event @staticmethod +def event_for_mark_test_expected_failure(test): +"""Creates an event that indicates the specified test is expected +to fail. + +@param test the TestCase instance to which this pertains. + +@return an event that specifies the given test is expected to fail. +""" +event = EventBuilder._event_dictionary_common( +test, +EventBuilder.TYPE_MARK_TEST_EXPECTED_FAILURE) +return event + +@staticmethod def add_entries_to_all_events(entries_dict): """Specifies a dictionary of entries to add to all test events. @@ -681,6 +696,11 @@ # timeout test status for this. self.expected_timeouts_by_basename = set() +# Tests which have reported that they are expecting to fail. These will +# be marked as expected failures even if they return a failing status, +# probably because they crashed or deadlocked. +self.expected_failures = set() + # Keep track of rerun-eligible tests. # This is a set that contains tests saved as: # {test_filename}:{test_class}:{test_name} @@ -721,6 +741,15 @@ component_count += 1 return key +def _mark_test_as_expected_failure(self, test_result_event): +key = self._make_key(test_result_event) +if key is not None: +self.expected_failures.add(key) +else: +sys.stderr.write( +"\nerror: test marked as expected failure but " +"failed to create key.\n") + def _mark_test_for_rerun_eligibility(self, test_result_event): key = self._make_key(test_result_event) if key is not None: @@ -796,6 +825,20 @@ # Convert to an expected timeout. event["status"] = EventBuilder.STATUS_EXPECTED_TIMEOUT +def _maybe_remap_expected_failure(self, event): +if event is None: +return + +key = self._make_key(event) +if key not in self.expected_failures: +return + +status = event.get("status", None) +if status in EventBuilder.TESTRUN_ERROR_STATUS_VALUES: +event["status"] = EventBuilder.STATUS_EXPECTED_FAILURE +elif status == EventBuilder.STATUS_SUCCESS: +event["status"] = EventBuilder.STATUS_UNEXPECTED_SUCCESS + def handle_event(self
Re: [Lldb-commits] [PATCH] D15533: Make the aarch64 lldb-server capable of debugging arm32 applications
tberghammer updated this revision to Diff 42986. tberghammer marked 2 inline comments as done. http://reviews.llvm.org/D15533 Files: source/Host/common/HostInfoBase.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp @@ -9,6 +9,7 @@ #if defined (__arm64__) || defined (__aarch64__) +#include "NativeRegisterContextLinux_arm.h" #include "NativeRegisterContextLinux_arm64.h" // C Includes @@ -23,6 +24,7 @@ #include "Plugins/Process/Linux/NativeProcessLinux.h" #include "Plugins/Process/Linux/Procfs.h" +#include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #include "Plugins/Process/Utility/RegisterContextLinux_arm64.h" // System includes - They have to be included after framework includes because they define some @@ -142,7 +144,19 @@ NativeThreadProtocol &native_thread, uint32_t concrete_frame_idx) { -return new NativeRegisterContextLinux_arm64(target_arch, native_thread, concrete_frame_idx); +Log *log = ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_REGISTERS); +switch (target_arch.GetMachine()) +{ +case llvm::Triple::arm: +return new NativeRegisterContextLinux_arm(target_arch, native_thread, concrete_frame_idx); +case llvm::Triple::aarch64: +return new NativeRegisterContextLinux_arm64(target_arch, native_thread, concrete_frame_idx); +default: +if (log) +log->Printf("NativeRegisterContextLinux::%s() have no register context for architecture: %s\n", __FUNCTION__, +target_arch.GetTriple().getArchName().str().c_str()); +return nullptr; +} } NativeRegisterContextLinux_arm64::NativeRegisterContextLinux_arm64 (const ArchSpec& target_arch, Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h @@ -7,7 +7,7 @@ // //===--===// -#if defined(__arm__) // arm register context only needed on arm devices +#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__) #ifndef lldb_NativeRegisterContextLinux_arm_h #define lldb_NativeRegisterContextLinux_arm_h @@ -91,11 +91,23 @@ protected: Error +DoReadRegisterValue(uint32_t offset, +const char* reg_name, +uint32_t size, +RegisterValue &value) override; + +Error DoWriteRegisterValue(uint32_t offset, const char* reg_name, const RegisterValue &value) override; Error +DoReadGPR(void *buf, size_t buf_size) override; + +Error +DoWriteGPR(void *buf, size_t buf_size) override; + +Error DoReadFPR(void *buf, size_t buf_size) override; Error @@ -182,4 +194,4 @@ #endif // #ifndef lldb_NativeRegisterContextLinux_arm_h -#endif // defined(__arm__) +#endif // defined(__arm__) || defined(__arm64__) || defined(__aarch64__) Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp @@ -7,17 +7,21 @@ // //===--===// -#if defined(__arm__) +#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__) #include "NativeRegisterContextLinux_arm.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Error.h" #include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" +#include "Plugins/Process/Linux/Procfs.h" #include "Plugins/Process/Utility/RegisterContextLinux_arm.h" +#include +#include + #define REG_CONTEXT_SIZE (GetGPRSize() + sizeof (m_fpr)) #ifndef PTRACE_GETVFPREGS @@ -169,14 +173,18 @@ { "Floating Point Registers", "fpu", k_num_fpr_registers_arm, g_fpu_regnums_arm } }; +#if defined(__arm__) + NativeRegisterContextLinux* NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(const ArchSpec& target_arch, NativeThreadProtocol &native_thread,
Re: [Lldb-commits] [PATCH] D15533: Make the aarch64 lldb-server capable of debugging arm32 applications
tberghammer added a comment. Note: This change is blocked by http://reviews.llvm.org/D15529. If that one will get rejected then we have to move some of the 32 <-> 64 architecture matching code into LLDB. Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp:1016 @@ +1015,3 @@ +#else // __aarch64__ +int regset = NT_PRSTATUS; +struct iovec ioVec; ovyalov wrote: > Could you wrap aarch64 code into a static function in > NativeRegisterContextLinux_arm64 so it can be reused both here and in > NativeRegisterContextLinux_arm64::DoReadGPR? I don't want to call NativeRegisterContextLinux_arm64::DoReadGPR because conceptually a function on NativeRegisterContextLinux_arm64 should read out arm64 resisters while this one reads out arm32 registers. I changed to code to use NativeRegisterContextLinux::ReadRegisterSet what simplifies it quite a bit. http://reviews.llvm.org/D15533 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15533: Make the aarch64 lldb-server capable of debugging arm32 applications
tberghammer updated this revision to Diff 42987. tberghammer added a comment. Fix type http://reviews.llvm.org/D15533 Files: source/Host/common/HostInfoBase.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp @@ -9,6 +9,7 @@ #if defined (__arm64__) || defined (__aarch64__) +#include "NativeRegisterContextLinux_arm.h" #include "NativeRegisterContextLinux_arm64.h" // C Includes @@ -23,6 +24,7 @@ #include "Plugins/Process/Linux/NativeProcessLinux.h" #include "Plugins/Process/Linux/Procfs.h" +#include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #include "Plugins/Process/Utility/RegisterContextLinux_arm64.h" // System includes - They have to be included after framework includes because they define some @@ -142,7 +144,19 @@ NativeThreadProtocol &native_thread, uint32_t concrete_frame_idx) { -return new NativeRegisterContextLinux_arm64(target_arch, native_thread, concrete_frame_idx); +Log *log = ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_REGISTERS); +switch (target_arch.GetMachine()) +{ +case llvm::Triple::arm: +return new NativeRegisterContextLinux_arm(target_arch, native_thread, concrete_frame_idx); +case llvm::Triple::aarch64: +return new NativeRegisterContextLinux_arm64(target_arch, native_thread, concrete_frame_idx); +default: +if (log) +log->Printf("NativeRegisterContextLinux::%s() have no register context for architecture: %s\n", __FUNCTION__, +target_arch.GetTriple().getArchName().str().c_str()); +return nullptr; +} } NativeRegisterContextLinux_arm64::NativeRegisterContextLinux_arm64 (const ArchSpec& target_arch, Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h @@ -7,7 +7,7 @@ // //===--===// -#if defined(__arm__) // arm register context only needed on arm devices +#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__) #ifndef lldb_NativeRegisterContextLinux_arm_h #define lldb_NativeRegisterContextLinux_arm_h @@ -91,11 +91,23 @@ protected: Error +DoReadRegisterValue(uint32_t offset, +const char* reg_name, +uint32_t size, +RegisterValue &value) override; + +Error DoWriteRegisterValue(uint32_t offset, const char* reg_name, const RegisterValue &value) override; Error +DoReadGPR(void *buf, size_t buf_size) override; + +Error +DoWriteGPR(void *buf, size_t buf_size) override; + +Error DoReadFPR(void *buf, size_t buf_size) override; Error @@ -182,4 +194,4 @@ #endif // #ifndef lldb_NativeRegisterContextLinux_arm_h -#endif // defined(__arm__) +#endif // defined(__arm__) || defined(__arm64__) || defined(__aarch64__) Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp @@ -7,17 +7,21 @@ // //===--===// -#if defined(__arm__) +#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__) #include "NativeRegisterContextLinux_arm.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Error.h" #include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" +#include "Plugins/Process/Linux/Procfs.h" #include "Plugins/Process/Utility/RegisterContextLinux_arm.h" +#include +#include + #define REG_CONTEXT_SIZE (GetGPRSize() + sizeof (m_fpr)) #ifndef PTRACE_GETVFPREGS @@ -169,14 +173,18 @@ { "Floating Point Registers", "fpu", k_num_fpr_registers_arm, g_fpu_regnums_arm } }; +#if defined(__arm__) + NativeRegisterContextLinux* NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(const ArchSpec& target_arch, NativeThreadProtocol &native_thread,
Re: [Lldb-commits] [PATCH] D15533: Make the aarch64 lldb-server capable of debugging arm32 applications
tberghammer marked an inline comment as done. tberghammer added a comment. http://reviews.llvm.org/D15533 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D15562: Add AccessModifierOffset to clang-format style
labath created this revision. labath added reviewers: zturner, tfiala. labath added a subscriber: lldb-commits. As we override the indent option of the LLVM style, we need to override the access modifier offset as well. Otherwise, classes will be formatted like such class A { public: int foo; }; which is not used anywhere in LLDB. This option makes clang-format style more similar to LLDB and brings it closer to the original intention of LLVM style, which was to not indent access modifiers. http://reviews.llvm.org/D15562 Files: .clang-format Index: .clang-format === --- .clang-format +++ .clang-format @@ -6,3 +6,4 @@ AllowShortFunctionsOnASingleLine: Inline ConstructorInitializerAllOnOneLineOrOnePerLine: true IndentCaseLabels: true +AccessModifierOffset: -4 Index: .clang-format === --- .clang-format +++ .clang-format @@ -6,3 +6,4 @@ AllowShortFunctionsOnASingleLine: Inline ConstructorInitializerAllOnOneLineOrOnePerLine: true IndentCaseLabels: true +AccessModifierOffset: -4 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+
ADodds created this revision. ADodds added a reviewer: zturner. ADodds added a subscriber: lldb-commits. ADodds set the repository for this revision to rL LLVM. Some distributions of python have their version defined as follows in patchlevel.h (note the '+'): #define PY_VERSION "2.7.9+" The '+' char needs to be stripped by the cmake regex so that LLDBs python lib detection is successfull. Repository: rL LLVM http://reviews.llvm.org/D15566 Files: cmake/modules/LLDBConfig.cmake Index: cmake/modules/LLDBConfig.cmake === --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -71,8 +71,8 @@ if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h") file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"") -string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1" - PYTHONLIBS_VERSION_STRING "${python_version_str}") +string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1" + PYTHONLIBS_VERSION_STRING "${python_version_str}") message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}") string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}") unset(python_version_str) Index: cmake/modules/LLDBConfig.cmake === --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -71,8 +71,8 @@ if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h") file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"") -string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1" - PYTHONLIBS_VERSION_STRING "${python_version_str}") +string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1" + PYTHONLIBS_VERSION_STRING "${python_version_str}") message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}") string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}") unset(python_version_str) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255769 - Man page whitespace/formatting change to appease igor(1)
Author: emaste Date: Wed Dec 16 08:59:48 2015 New Revision: 255769 URL: http://llvm.org/viewvc/llvm-project?rev=255769&view=rev Log: Man page whitespace/formatting change to appease igor(1) igor is a tool to detect common problems and style conformance issues in man pages and other documents. This is a non-content change to address the items it reported, before making content changes. See http://www.wonkity.com/~wblock/igor/igor.1.html for more information about igor(1). Modified: lldb/trunk/docs/lldb.1 Modified: lldb/trunk/docs/lldb.1 URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/lldb.1?rev=255769&r1=255768&r2=255769&view=diff == --- lldb/trunk/docs/lldb.1 (original) +++ lldb/trunk/docs/lldb.1 Wed Dec 16 08:59:48 2015 @@ -1,10 +1,10 @@ .Dd June 7, 2012 \" DATE .Dt LLDB 1 \" Program name and manual section number .Os -.Sh NAME \" Section Header - required - don't modify +.Sh NAME \" Section Header - required - do not modify .Nm lldb .Nd The debugger -.Sh SYNOPSIS \" Section Header - required - don't modify +.Sh SYNOPSIS \" Section Header - required - do not modify .Nm lldb .Op Fl hvdexw .Op Fl a Ar arch @@ -13,7 +13,7 @@ .Op Fl n Ar process-name .Op Fl p Ar pid .Ar [[--] ...] -.Sh DESCRIPTION \" Section Header - required - don't modify +.Sh DESCRIPTION \" Section Header - required - do not modify .Nm is the command line interface for the LLDB debugger library. .Nm @@ -24,7 +24,8 @@ The following options are available: .It Fl h, -help Prints out the usage information for the .Nm -debugger. The +debugger. +The .Fl -help text may be more up-to-date and authoritative than the command line options described in this man @@ -60,7 +61,8 @@ Specifies a currently running process th should attach to. .It Fl l, -script-language Ar language Tells the debugger to use the specified scripting language for -user-defined scripts, rather than the default. Valid scripting +user-defined scripts, rather than the default. +Valid scripting languages that can be specified include Python, Perl, Ruby and Tcl. Currently only the Python extensions have been implemented. .It Fl d, -debug @@ -80,9 +82,11 @@ to open source files using the host's "e .It Fl x, -no-lldbinit Do not automatically parse any '.lldbinit' files. .Pp -(If you don't provide -f then the first argument will be the file to be debugged +(If you do not provide -f then the first argument will be the file to +be debugged so 'lldb -- [ []]' also works. -Remember to end the options with "--" if any of your arguments have a "-" in them.) +Remember to end the options with "--" if any of your arguments have +a "-" in them.) .El .Sh USING LLDB In @@ -91,7 +95,8 @@ there is a .Cm help command which can be used to find descriptions and examples of all .Nm -commands. To get help on +commands. +To get help on .Qq Cm breakpoint set you would type .Qq Cm help breakpoint set . @@ -99,7 +104,8 @@ you would type There is also an .Cm apropos command which will search the help text of all commands -for a given term -- this is useful for locating a command by topic. For instance, +for a given term -- this is useful for locating a command by topic. +For instance, .Qq Cm apropos breakpoint will list any command that has the word .Qq Cm breakpoint @@ -108,9 +114,10 @@ in its help text. .Nm will read settings/aliases/commands from three files at startup, if they exist. .Pp -First, it will read a +First, it will read a .Pa ~/.lldbinit-debugger -command file. If you are using the +command file. +If you are using the .Nm command line interface, this is .Pa ~/.lldbinit-lldb . ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255771 - Include -c, -core in the lldb(1) man page
Author: emaste Date: Wed Dec 16 09:37:21 2015 New Revision: 255771 URL: http://llvm.org/viewvc/llvm-project?rev=255771&view=rev Log: Include -c, -core in the lldb(1) man page Modified: lldb/trunk/docs/lldb.1 Modified: lldb/trunk/docs/lldb.1 URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/lldb.1?rev=255771&r1=255770&r2=255771&view=diff == --- lldb/trunk/docs/lldb.1 (original) +++ lldb/trunk/docs/lldb.1 Wed Dec 16 09:37:21 2015 @@ -1,4 +1,4 @@ -.Dd June 7, 2012 \" DATE +.Dd December 16, 2015 \" DATE .Dt LLDB 1 \" Program name and manual section number .Os .Sh NAME \" Section Header - required - do not modify @@ -8,6 +8,7 @@ .Nm lldb .Op Fl hvdexw .Op Fl a Ar arch +.Op Fl c Ar core-file .Op Fl l Ar script-language .Op Fl s Ar lldb-commands .Op Fl n Ar process-name @@ -59,6 +60,8 @@ to it as early in the process-launch as Specifies a currently running process that .Nm should attach to. +.It Fl c, -core Ar core-file +Specifies the core file to examine. .It Fl l, -script-language Ar language Tells the debugger to use the specified scripting language for user-defined scripts, rather than the default. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255774 - Wrap Notes in --help output to 80 columns
Author: emaste Date: Wed Dec 16 09:49:38 2015 New Revision: 255774 URL: http://llvm.org/viewvc/llvm-project?rev=255774&view=rev Log: Wrap Notes in --help output to 80 columns Modified: lldb/trunk/tools/driver/Driver.cpp Modified: lldb/trunk/tools/driver/Driver.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=255774&r1=255773&r2=255774&view=diff == --- lldb/trunk/tools/driver/Driver.cpp (original) +++ lldb/trunk/tools/driver/Driver.cpp Wed Dec 16 09:49:38 2015 @@ -346,21 +346,27 @@ ShowUsage (FILE *out, OptionDefinition * indent_level, ""); indent_level += 5; -fprintf (out, "\n%*sMultiple \"-s\" and \"-o\" options can be provided. They will be processed from left to right in order, " - "\n%*swith the source files and commands interleaved. The same is true of the \"-S\" and \"-O\" options." - "\n%*sThe before file and after file sets can intermixed freely, the command parser will sort them out." - "\n%*sThe order of the file specifiers (\"-c\", \"-f\", etc.) is not significant in this regard.\n\n", +fprintf (out, "\n%*sMultiple \"-s\" and \"-o\" options can be provided. They will be processed" + "\n%*sfrom left to right in order, with the source files and commands" + "\n%*sinterleaved. The same is true of the \"-S\" and \"-O\" options. The before" + "\n%*sfile and after file sets can intermixed freely, the command parser will" + "\n%*ssort them out. The order of the file specifiers (\"-c\", \"-f\", etc.) is" + "\n%*snot significant in this regard.\n\n", indent_level, "", indent_level, "", indent_level, "", + indent_level, "", + indent_level, "", indent_level, ""); -fprintf (out, "\n%*sIf you don't provide -f then the first argument will be the file to be debugged" - "\n%*swhich means that '%s -- [ []]' also works." - "\n%*sBut remember to end the options with \"--\" if any of your arguments have a \"-\" in them.\n\n", +fprintf (out, "\n%*sIf you don't provide -f then the first argument will be the file to be" + "\n%*sdebugged which means that '%s -- [ []]' also" + "\n%*sworks. But remember to end the options with \"--\" if any of your" + "\n%*sarguments have a \"-\" in them.\n\n", indent_level, "", indent_level, "", name, + indent_level, "", indent_level, ""); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15562: Add AccessModifierOffset to clang-format style
tfiala added a reviewer: jingham. tfiala added a comment. Hey Jim, this looks right to me. Agree? -Todd http://reviews.llvm.org/D15562 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. Where did you get this version of Python? I don't see anything wrong with this patch, but I'm a little curious what this + means Repository: rL LLVM http://reviews.llvm.org/D15566 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255775 - Remove the "MacOSX and Linux" and "Linux" targets from Xcode.
Author: tfiala Date: Wed Dec 16 10:09:59 2015 New Revision: 255775 URL: http://llvm.org/viewvc/llvm-project?rev=255775&view=rev Log: Remove the "MacOSX and Linux" and "Linux" targets from Xcode. I added these long ago, but as we work to simplify the Xcode project, their lack of use has made them cleanup targets. Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=255775&r1=255774&r2=255775&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Dec 16 10:09:59 2015 @@ -7,18 +7,6 @@ objects = { /* Begin PBXAggregateTarget section */ - 235AFBBB199BC6FD00897A4B /* MacOSX and Linux */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 235AFBBC199BC6FD00897A4B /* Build configuration list for PBXAggregateTarget "MacOSX and Linux" */; - buildPhases = ( - ); - dependencies = ( - 235AFBC4199BC70B00897A4B /* PBXTargetDependency */, - 235AFBC2199BC70700897A4B /* PBXTargetDependency */, - ); - name = "MacOSX and Linux"; - productName = "MacOSX and Linux"; - }; 26CEF3A914FD58BF007286B2 /* desktop_no_xpc */ = { isa = PBXAggregateTarget; buildConfigurationList = 26CEF3AD14FD58BF007286B2 /* Build configuration list for PBXAggregateTarget "desktop_no_xpc" */; @@ -940,20 +928,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 235AFBC1199BC70700897A4B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 26F5C26910F3D9A4009D5894; - remoteInfo = "lldb-tool"; - }; - 235AFBC3199BC70B00897A4B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 235AFBB5199BC6AD00897A4B; - remoteInfo = Linux; - }; 239504C41BDD3FD700963CEA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */; @@ -5952,20 +5926,6 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXLegacyTarget section */ - 235AFBB5199BC6AD00897A4B /* Linux */ = { - isa = PBXLegacyTarget; - buildArgumentsString = "-u scripts/Python/remote-build.py -x $(ACTION)"; - buildConfigurationList = 235AFBBA199BC6AD00897A4B /* Build configuration list for PBXLegacyTarget "Linux" */; - buildPhases = ( - ); - buildToolPath = python; - buildWorkingDirectory = .; - dependencies = ( - ); - name = Linux; - passBuildSettingsInEnvironment = 1; - productName = Linux; - }; 2687EAC51508110B00DD8C2E /* install-headers */ = { isa = PBXLegacyTarget; buildArgumentsString = "$(ACTION)"; @@ -6180,8 +6140,6 @@ 2689FFC913353D7A00698AC0 /* lldb-core */, 26DC6A0F1337FE6900FF7998 /* lldb-server */, 2687EAC51508110B00DD8C2E /* install-headers */, - 235AFBB5199BC6AD00897A4B /* Linux */, - 235AFBBB199BC6FD00897A4B /* MacOSX and Linux */, 2690CD161A6DC0D000E717C8 /* lldb-mi */, 942829BF1A89835300521B30 /* lldb-argdumper */, 239504D31BDD451400963CEA /* lldb-gtest */, @@ -7151,16 +7109,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 235AFBC2199BC70700897A4B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 26F5C26910F3D9A4009D5894 /* lldb-tool */; - targetProxy = 235AFBC1199BC70700897A4B /* PBXContainerItemProxy */; - }; - 235AFBC4199BC70B00897
[Lldb-commits] [PATCH] D15576: Inspect global static const variables
EwanCrawford created this revision. EwanCrawford added reviewers: tberghammer, clayborg. EwanCrawford added a subscriber: lldb-commits. EwanCrawford set the repository for this revision to rL LLVM. This patch adds support for printing global static const variables which are given a DW_AT_const_value DWARF tag by clang. Fix for bug https://llvm.org/bugs/show_bug.cgi?id=25653 Repository: rL LLVM http://reviews.llvm.org/D15576 Files: packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py packages/Python/lldbsuite/test/lang/c/global_variables/main.c source/Core/ValueObject.cpp source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp === --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -4260,7 +4260,10 @@ } else { -scope = eValueTypeVariableLocal; +if (location_is_const_value_data) +scope = eValueTypeVariableStatic; +else +scope = eValueTypeVariableLocal; } } Index: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp === --- source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -815,7 +815,7 @@ bool is_declaration = false; //bool is_artificial = false; bool has_address = false; -bool has_location = false; +bool has_location_or_const_value = false; bool is_global_or_static_variable = false; DWARFFormValue specification_die_form; @@ -860,7 +860,8 @@ break; case DW_AT_location: -has_location = true; +case DW_AT_const_value: +has_location_or_const_value = true; if (tag == DW_TAG_variable) { const DWARFDebugInfoEntry* parent_die = die.GetParent(); @@ -1035,7 +1036,7 @@ break; case DW_TAG_variable: -if (name && has_location && is_global_or_static_variable) +if (name && has_location_or_const_value && is_global_or_static_variable) { globals.Insert (ConstString(name), DIERef(cu_offset, die.GetOffset())); // Be sure to include variables by their mangled and demangled Index: source/Core/ValueObject.cpp === --- source/Core/ValueObject.cpp +++ source/Core/ValueObject.cpp @@ -1135,6 +1135,7 @@ if (m_data.GetByteSize()) { data = m_data; +error.Clear(); return data.GetByteSize(); } else Index: packages/Python/lldbsuite/test/lang/c/global_variables/main.c === --- packages/Python/lldbsuite/test/lang/c/global_variables/main.c +++ packages/Python/lldbsuite/test/lang/c/global_variables/main.c @@ -10,6 +10,7 @@ int g_common_1; // Not initialized on purpose to cause it to be undefined external in .o file int g_file_global_int = 42; +static const int g_file_static_int = 2; const char *g_file_global_cstr = "g_file_global_cstr"; static const char *g_file_static_cstr = "g_file_static_cstr"; @@ -16,7 +17,7 @@ extern int g_a; int main (int argc, char const *argv[]) { -g_common_1 = g_file_global_int / 2; +g_common_1 = g_file_global_int / g_file_static_int; static const char *g_func_static_cstr = "g_func_static_cstr"; printf ("%s %s\n", g_file_global_cstr, g_file_static_cstr); return g_file_global_int + g_a + g_common_1; // Set break point at this line. break $source:$line; continue; var -global g_a -global g_global_int Index: packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py === --- packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py +++ packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py @@ -52,6 +52,7 @@ # Check that GLOBAL scopes are indicated for the variables. self.expect("frame variable --show-types --scope --show-globals --no-args", VARIABLES_DISPLAYED_CORRECTLY, substrs = ['GLOBAL: (int) g_file_global_int = 42', + 'STATIC: (const int) g_file_static_int = 2', 'GLOBAL: (const char *) g_file_global_cstr', '"g_file_global_cstr"', 'STATIC: (const char *) g_file_static_cstr', Index: source/Plugins/SymbolFile/DWARF/SymbolF
Re: [Lldb-commits] [PATCH] D15562: Add AccessModifierOffset to clang-format style
We don't indent access modifiers, so if AccessModifierOffset does what it's name suggests, then that's right. Jim > On Dec 16, 2015, at 8:09 AM, Todd Fiala wrote: > > tfiala added a reviewer: jingham. > tfiala added a comment. > > Hey Jim, this looks right to me. Agree? > > -Todd > > > http://reviews.llvm.org/D15562 > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15562: Add AccessModifierOffset to clang-format style
jingham added a subscriber: jingham. jingham added a comment. We don't indent access modifiers, so if AccessModifierOffset does what it's name suggests, then that's right. Jim http://reviews.llvm.org/D15562 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D15582: Improve error handling for `f s #`
amccarth created this revision. amccarth added reviewers: emaste, jasonmolenda. amccarth added a subscriber: lldb-commits. When there were too many arguments given for the `frame select` command, the error message wasn't particularly helpful and then lldb would try to select frame -1, which resulted in an additional confusing error message. This happened when the user expects `f s 1` to be a short form of `frame select 1`, but the `f` itself is an alias for `frame select`, so the `s` is extraneous. The new output should make it easier for the user to understand what went wrong: (lldb) f s 1 error: too many arguments; expect frame-index, saw 's'. Command Options Usage: frame select [-r ] [] -r ( --relative ) A relative frame index offset from the current frame index. http://reviews.llvm.org/D15582 Files: packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py source/Commands/CommandObjectFrame.cpp Index: source/Commands/CommandObjectFrame.cpp === --- source/Commands/CommandObjectFrame.cpp +++ source/Commands/CommandObjectFrame.cpp @@ -262,8 +262,10 @@ } else { -result.AppendError ("invalid arguments.\n"); +result.AppendErrorWithFormat ("too many arguments; expected frame-index, saw '%s'.\n", + command.GetArgumentAtIndex(0)); m_options.GenerateOptionUsage (result.GetErrorStream(), this); +return false; } } Index: packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py === --- packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py +++ packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py @@ -29,6 +29,7 @@ ('dis', 'disassemble'), ('ta st a', 'target stop-hook add'), ('fr v', 'frame variable'), +('f 1', 'frame select 1'), ('ta st li', 'target stop-hook list'), ] Index: source/Commands/CommandObjectFrame.cpp === --- source/Commands/CommandObjectFrame.cpp +++ source/Commands/CommandObjectFrame.cpp @@ -262,8 +262,10 @@ } else { -result.AppendError ("invalid arguments.\n"); +result.AppendErrorWithFormat ("too many arguments; expected frame-index, saw '%s'.\n", + command.GetArgumentAtIndex(0)); m_options.GenerateOptionUsage (result.GetErrorStream(), this); +return false; } } Index: packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py === --- packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py +++ packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py @@ -29,6 +29,7 @@ ('dis', 'disassemble'), ('ta st a', 'target stop-hook add'), ('fr v', 'frame variable'), +('f 1', 'frame select 1'), ('ta st li', 'target stop-hook list'), ] ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255808 - Rework breakpoint language filtering to use the symbol context's language.
Author: dperchik Date: Wed Dec 16 13:40:00 2015 New Revision: 255808 URL: http://llvm.org/viewvc/llvm-project?rev=255808&view=rev Log: Rework breakpoint language filtering to use the symbol context's language. This patch reworks the breakpoint filter-by-language patch to use the symbol context instead of trying to guess the language solely from the symbol's name. This has the advantage that symbols compiled with debug info will have their actual language known. Symbols without debug info will still do the same "guess"ing because Symbol::GetLanguage() is implemented using Mangled::GuessLanguage(). The recognition of ObjC names was merged into Mangled::GuessLanguage. Reviewed by: jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15326 Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h lldb/trunk/include/lldb/Target/Language.h lldb/trunk/include/lldb/Target/LanguageRuntime.h lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp lldb/trunk/source/Core/Mangled.cpp lldb/trunk/source/Symbol/SymbolContext.cpp lldb/trunk/source/Target/Language.cpp lldb/trunk/source/Target/LanguageRuntime.cpp Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=255808&r1=255807&r2=255808&view=diff == --- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original) +++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Wed Dec 16 13:40:00 2015 @@ -253,6 +253,9 @@ public: uint32_t GetResolvedMask () const; +lldb::LanguageType +GetLanguage () const; + //-- /// Find a block that defines the function represented by this /// symbol context. Modified: lldb/trunk/include/lldb/Target/Language.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Language.h?rev=255808&r1=255807&r2=255808&view=diff == --- lldb/trunk/include/lldb/Target/Language.h (original) +++ lldb/trunk/include/lldb/Target/Language.h Wed Dec 16 13:40:00 2015 @@ -173,6 +173,10 @@ public: static bool LanguageIsPascal (lldb::LanguageType language); +// return the primary language, so if LanguageIsC(l), return eLanguageTypeC, etc. +static lldb::LanguageType +GetPrimaryLanguage (lldb::LanguageType language); + static void GetLanguagesSupportingTypeSystems (std::set &languages, std::set &languages_for_expressions); Modified: lldb/trunk/include/lldb/Target/LanguageRuntime.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/LanguageRuntime.h?rev=255808&r1=255807&r2=255808&view=diff == --- lldb/trunk/include/lldb/Target/LanguageRuntime.h (original) +++ lldb/trunk/include/lldb/Target/LanguageRuntime.h Wed Dec 16 13:40:00 2015 @@ -117,9 +117,6 @@ public: return m_process; } -static lldb::LanguageType -GuessLanguageForSymbolByName (Target &target, const char *symbol_name); - Target& GetTargetRef() { Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=255808&r1=255807&r2=255808&view=diff == --- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original) +++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Wed Dec 16 13:40:00 2015 @@ -21,7 +21,6 @@ #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" -#include "lldb/Target/LanguageRuntime.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" using namespace lldb; @@ -259,8 +258,6 @@ BreakpointResolverName::SearchCallback(S // If the filter specifies a Compilation Unit, remove the ones that don't pass at this point. if (filter_by_cu || filter_by_language) { -Target &target = m_breakpoint->GetTarget(); - uint32_t num_functions = func_list.GetSize(); for (size_t idx = 0; idx < num_functions; idx++) @@ -276,32 +273,12 @@ BreakpointResolverName::SearchCallback(S if (filter_by_language) { -const char *name = sc.GetFunctionName(Mangled::ePreferMangled).AsCString(); -if (name) +LanguageType sym_language = sc.GetLanguage(); +if ((Language::GetPrimaryLanguage(sym_language) != + Language::GetPrimaryLanguage(m_language)) && +(sym_language != eLanguageTypeUnknown)) { -LanguageType sym_langua
Re: [Lldb-commits] [PATCH] D15326: Rework breakpoint language filtering to use the symbol context's language.
This revision was automatically updated to reflect the committed changes. Closed by commit rL255808: Rework breakpoint language filtering to use the symbol context's language. (authored by dperchik). Changed prior to commit: http://reviews.llvm.org/D15326?vs=42911&id=43044#toc Repository: rL LLVM http://reviews.llvm.org/D15326 Files: lldb/trunk/include/lldb/Symbol/SymbolContext.h lldb/trunk/include/lldb/Target/Language.h lldb/trunk/include/lldb/Target/LanguageRuntime.h lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp lldb/trunk/source/Core/Mangled.cpp lldb/trunk/source/Symbol/SymbolContext.cpp lldb/trunk/source/Target/Language.cpp lldb/trunk/source/Target/LanguageRuntime.cpp Index: lldb/trunk/include/lldb/Symbol/SymbolContext.h === --- lldb/trunk/include/lldb/Symbol/SymbolContext.h +++ lldb/trunk/include/lldb/Symbol/SymbolContext.h @@ -253,6 +253,9 @@ uint32_t GetResolvedMask () const; +lldb::LanguageType +GetLanguage () const; + //-- /// Find a block that defines the function represented by this /// symbol context. Index: lldb/trunk/include/lldb/Target/LanguageRuntime.h === --- lldb/trunk/include/lldb/Target/LanguageRuntime.h +++ lldb/trunk/include/lldb/Target/LanguageRuntime.h @@ -117,9 +117,6 @@ return m_process; } -static lldb::LanguageType -GuessLanguageForSymbolByName (Target &target, const char *symbol_name); - Target& GetTargetRef() { Index: lldb/trunk/include/lldb/Target/Language.h === --- lldb/trunk/include/lldb/Target/Language.h +++ lldb/trunk/include/lldb/Target/Language.h @@ -173,6 +173,10 @@ static bool LanguageIsPascal (lldb::LanguageType language); +// return the primary language, so if LanguageIsC(l), return eLanguageTypeC, etc. +static lldb::LanguageType +GetPrimaryLanguage (lldb::LanguageType language); + static void GetLanguagesSupportingTypeSystems (std::set &languages, std::set &languages_for_expressions); Index: lldb/trunk/source/Symbol/SymbolContext.cpp === --- lldb/trunk/source/Symbol/SymbolContext.cpp +++ lldb/trunk/source/Symbol/SymbolContext.cpp @@ -525,6 +525,38 @@ return false; } +LanguageType +SymbolContext::GetLanguage () const +{ +LanguageType lang; +if (function && +(lang = function->GetLanguage()) != eLanguageTypeUnknown) +{ +return lang; +} +else if (variable && + (lang = variable->GetLanguage()) != eLanguageTypeUnknown) +{ +return lang; +} +else if (symbol && + (lang = symbol->GetLanguage()) != eLanguageTypeUnknown) +{ +return lang; +} +else if (comp_unit && + (lang = comp_unit->GetLanguage()) != eLanguageTypeUnknown) +{ +return lang; +} +else if (symbol) +{ +// If all else fails, try to guess the language from the name. +return symbol->GetMangled().GuessLanguage(); +} +return eLanguageTypeUnknown; +} + bool SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc, SymbolContext &next_frame_sc, Index: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp === --- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp +++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp @@ -21,7 +21,6 @@ #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" -#include "lldb/Target/LanguageRuntime.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" using namespace lldb; @@ -259,8 +258,6 @@ // If the filter specifies a Compilation Unit, remove the ones that don't pass at this point. if (filter_by_cu || filter_by_language) { -Target &target = m_breakpoint->GetTarget(); - uint32_t num_functions = func_list.GetSize(); for (size_t idx = 0; idx < num_functions; idx++) @@ -276,32 +273,12 @@ if (filter_by_language) { -const char *name = sc.GetFunctionName(Mangled::ePreferMangled).AsCString(); -if (name) +LanguageType sym_language = sc.GetLanguage(); +if ((Language::GetPrimaryLanguage(sym_language) != + Language::GetPrimaryLanguage(m_language)) && +(sym_language != eLanguageTypeUnknown)) { -LanguageType sym_language = LanguageRuntime::GuessLanguageForSymbolByName(target, name); -if (Language:
Re: [Lldb-commits] [PATCH] D12809: Better scheme to lookup alternate mangled name when looking up function address.
dawn added a comment. Can a "code owner" please review this patch? Thanks, -Dawn http://reviews.llvm.org/D12809 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15562: Add AccessModifierOffset to clang-format style
tfiala added a comment. I think we're good with this then, Pavel. http://reviews.llvm.org/D15562 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
dawn created this revision. dawn added reviewers: clayborg, ki.stfu, abidh. dawn added a subscriber: lldb-commits. dawn set the repository for this revision to rL LLVM. This adds support for the new command: target modules dump line-entries which dumps the line entries found for 'file' for all CUs in all modules. This command is used to fix the MI command: -symbol-list-lines which didn't work for header files because it called: target modules dump line-table which only dumps line tables for a compilation unit. Repository: rL LLVM http://reviews.llvm.org/D15593 Files: packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py packages/Python/lldbsuite/test/tools/lldb-mi/symbol/symbol_list_lines_inline_test.h source/Commands/CommandObjectTarget.cpp tools/lldb-mi/MICmdCmdSymbol.cpp Index: tools/lldb-mi/MICmdCmdSymbol.cpp === --- tools/lldb-mi/MICmdCmdSymbol.cpp +++ tools/lldb-mi/MICmdCmdSymbol.cpp @@ -82,11 +82,7 @@ CMICMDBASE_GETOPTION(pArgFile, File, m_constStrArgNameFile); const CMIUtilString &strFilePath(pArgFile->GetValue()); -// FIXME: this won't work for header files! To try and use existing -// commands to get this to work for header files would be too slow. -// Instead, this code should be rewritten to use APIs and/or support -// should be added to lldb which would work for header files. -const CMIUtilString strCmd(CMIUtilString::Format("target modules dump line-table \"%s\"", strFilePath.AddSlashes().c_str())); +const CMIUtilString strCmd(CMIUtilString::Format("target modules dump line-entries \"%s\"", strFilePath.AddSlashes().c_str())); CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()); const lldb::ReturnStatus rtn = rSessionInfo.GetDebugger().GetCommandInterpreter().HandleCommand(strCmd.c_str(), m_lldbResult); @@ -110,10 +106,10 @@ { // Match LineEntry using regex. static MIUtilParse::CRegexParser g_lineentry_header_regex( -"^ *Line table for (.+) in `(.+)$"); -// ^1=file ^2=module +"^ *Lines for file (.+) in compilation unit (.+) in `(.+)$"); +// ^1=file ^2=cu^3=module -MIUtilParse::CRegexParser::Match match(3); +MIUtilParse::CRegexParser::Match match(4); const bool ok = g_lineentry_header_regex.Execute(input, match); if (ok) @@ -146,12 +142,12 @@ // Match LineEntry using regex. static MIUtilParse::CRegexParser g_lineentry_nocol_regex( -"^ *(0x[0-9a-fA-F]+): (.+):([0-9]+)$"); +"^ *\\[(0x[0-9a-fA-F]+)-(0x[0-9a-fA-F]+)\\): (.+):([0-9]+)$"); static MIUtilParse::CRegexParser g_lineentry_col_regex( -"^ *(0x[0-9a-fA-F]+): (.+):([0-9]+):[0-9]+$"); -// ^1=addr ^2=f ^3=line ^4=:col(opt) +"^ *\\[(0x[0-9a-fA-F]+)-(0x[0-9a-fA-F]+)\\): (.+):([0-9]+):[0-9]+$"); +// ^1=start ^2=end ^3=f ^4=line ^5=:col(opt) -MIUtilParse::CRegexParser::Match match(5); +MIUtilParse::CRegexParser::Match match(6); // First try matching the LineEntry with the column, // then try without the column. @@ -160,8 +156,8 @@ if (ok) { addr = match.GetMatchAtIndex(1); -file = match.GetMatchAtIndex(2); -line = match.GetMatchAtIndex(3); +file = match.GetMatchAtIndex(3); +line = match.GetMatchAtIndex(4); } return ok; } @@ -222,10 +218,6 @@ if (!ParseLLDBLineAddressEntry(rLine.c_str(), strAddr, strFile, strLine)) continue; -// Skip entries which don't match the desired source. -if (strWantFile != strFile) -continue; - const CMICmnMIValueConst miValueConst(strAddr); const CMICmnMIValueResult miValueResult("pc", miValueConst); CMICmnMIValueTuple miValueTuple(miValueResult); Index: source/Commands/CommandObjectTarget.cpp === --- source/Commands/CommandObjectTarget.cpp +++ source/Commands/CommandObjectTarget.cpp @@ -1524,6 +1524,91 @@ return num_matches; } +static uint32_t +DumpFileLineEntries (CommandInterpreter &interpreter, + Stream &strm, + Module *module, + const FileSpec &file_spec, + bool load_addresses) +{ +uint32_t num_matches = 0; +if (module) +{ +// Look through all the compilation units (CUs) for ones that contain +// lines of code from this source file. +assert(file_spec.GetFilename().AsCString()); +bool has_path = (file_spec.GetDirectory().AsCString() != 0); +int ncus = module->GetNumCompileUnits(); +for (int i = 0; i < ncus; i++) +{ +// Look for a matching source file in this CU. +CompUnitSP cu_sp(modul
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
dawn updated this revision to Diff 43076. dawn added a comment. Updated patch to include changes to TestHelp.py. Repository: rL LLVM http://reviews.llvm.org/D15593 Files: packages/Python/lldbsuite/test/help/TestHelp.py packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py packages/Python/lldbsuite/test/tools/lldb-mi/symbol/symbol_list_lines_inline_test.h source/Commands/CommandObjectTarget.cpp tools/lldb-mi/MICmdCmdSymbol.cpp Index: tools/lldb-mi/MICmdCmdSymbol.cpp === --- tools/lldb-mi/MICmdCmdSymbol.cpp +++ tools/lldb-mi/MICmdCmdSymbol.cpp @@ -82,11 +82,7 @@ CMICMDBASE_GETOPTION(pArgFile, File, m_constStrArgNameFile); const CMIUtilString &strFilePath(pArgFile->GetValue()); -// FIXME: this won't work for header files! To try and use existing -// commands to get this to work for header files would be too slow. -// Instead, this code should be rewritten to use APIs and/or support -// should be added to lldb which would work for header files. -const CMIUtilString strCmd(CMIUtilString::Format("target modules dump line-table \"%s\"", strFilePath.AddSlashes().c_str())); +const CMIUtilString strCmd(CMIUtilString::Format("target modules dump line-entries \"%s\"", strFilePath.AddSlashes().c_str())); CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()); const lldb::ReturnStatus rtn = rSessionInfo.GetDebugger().GetCommandInterpreter().HandleCommand(strCmd.c_str(), m_lldbResult); @@ -110,10 +106,10 @@ { // Match LineEntry using regex. static MIUtilParse::CRegexParser g_lineentry_header_regex( -"^ *Line table for (.+) in `(.+)$"); -// ^1=file ^2=module +"^ *Lines for file (.+) in compilation unit (.+) in `(.+)$"); +// ^1=file ^2=cu^3=module -MIUtilParse::CRegexParser::Match match(3); +MIUtilParse::CRegexParser::Match match(4); const bool ok = g_lineentry_header_regex.Execute(input, match); if (ok) @@ -146,12 +142,12 @@ // Match LineEntry using regex. static MIUtilParse::CRegexParser g_lineentry_nocol_regex( -"^ *(0x[0-9a-fA-F]+): (.+):([0-9]+)$"); +"^ *\\[(0x[0-9a-fA-F]+)-(0x[0-9a-fA-F]+)\\): (.+):([0-9]+)$"); static MIUtilParse::CRegexParser g_lineentry_col_regex( -"^ *(0x[0-9a-fA-F]+): (.+):([0-9]+):[0-9]+$"); -// ^1=addr ^2=f ^3=line ^4=:col(opt) +"^ *\\[(0x[0-9a-fA-F]+)-(0x[0-9a-fA-F]+)\\): (.+):([0-9]+):[0-9]+$"); +// ^1=start ^2=end ^3=f ^4=line ^5=:col(opt) -MIUtilParse::CRegexParser::Match match(5); +MIUtilParse::CRegexParser::Match match(6); // First try matching the LineEntry with the column, // then try without the column. @@ -160,8 +156,8 @@ if (ok) { addr = match.GetMatchAtIndex(1); -file = match.GetMatchAtIndex(2); -line = match.GetMatchAtIndex(3); +file = match.GetMatchAtIndex(3); +line = match.GetMatchAtIndex(4); } return ok; } @@ -222,10 +218,6 @@ if (!ParseLLDBLineAddressEntry(rLine.c_str(), strAddr, strFile, strLine)) continue; -// Skip entries which don't match the desired source. -if (strWantFile != strFile) -continue; - const CMICmnMIValueConst miValueConst(strAddr); const CMICmnMIValueResult miValueResult("pc", miValueConst); CMICmnMIValueTuple miValueTuple(miValueResult); Index: source/Commands/CommandObjectTarget.cpp === --- source/Commands/CommandObjectTarget.cpp +++ source/Commands/CommandObjectTarget.cpp @@ -1524,6 +1524,91 @@ return num_matches; } +static uint32_t +DumpFileLineEntries (CommandInterpreter &interpreter, + Stream &strm, + Module *module, + const FileSpec &file_spec, + bool load_addresses) +{ +uint32_t num_matches = 0; +if (module) +{ +// Look through all the compilation units (CUs) for ones that contain +// lines of code from this source file. +assert(file_spec.GetFilename().AsCString()); +bool has_path = (file_spec.GetDirectory().AsCString() != 0); +int ncus = module->GetNumCompileUnits(); +for (int i = 0; i < ncus; i++) +{ +// Look for a matching source file in this CU. +CompUnitSP cu_sp(module->GetCompileUnitAtIndex(i)); +if (!cu_sp) +continue; +CompileUnit *cu = cu_sp.get(); +const FileSpecList &cu_file_list = cu->GetSupportFiles(); +size_t file_idx = cu_file_list.FindFileIndex(0, file_spec, has_path); +if (file_idx == UINT32_MAX) +// No such file in this CU. +
Re: [Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+
krytarowski added a subscriber: krytarowski. krytarowski added a comment. In http://reviews.llvm.org/D15566#311998, @zturner wrote: > Where did you get this version of Python? I don't see anything wrong with > this patch, but I'm a little curious what this + means I think a patched version. I don't know what vendor is changing Python's version. Perhaps good to stop doing it if it breaks software. Repository: rL LLVM http://reviews.llvm.org/D15566 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
jingham added a subscriber: jingham. jingham requested changes to this revision. jingham added a reviewer: jingham. jingham added a comment. This revision now requires changes to proceed. I don't think this is sufficiently different from "target modules dump line-tables" to warrant a separate command. This seems more like a candidate for a flag to "target modules dump line-tables" like --search-for-inlines or something. That would keep the command surface more manageable and also make the option more discoverable, since you can get both variants in one place. Repository: rL LLVM http://reviews.llvm.org/D15593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
dawn added a comment. In http://reviews.llvm.org/D15593#312571, @jingham wrote: > I don't think this is sufficiently different from "target modules dump > line-tables" to warrant a separate command. This seems more like a candidate > for a flag to "target modules dump line-tables" like --search-for-inlines or > something. That would keep the command surface more manageable and also make > the option more discoverable, since you can get both variants in one place. I first thought about adding it as an option to the line-table but decided against it because the information provided by each are just too different. Dumping the tables gives you raw output from the CU's DWARF .debug_line entries, including end sequences, all files in the compilation unit, etc.: (lldb) target modules du line-table x.cpp Line table for /Users/dawn/tmp/x.cpp in `x 0x00010aa0: /Users/dawn/tmp/x.cpp:12 0x00010ab6: /Users/dawn/tmp/x.cpp:14 0x00010af2: /Users/dawn/tmp/x.cpp:16 0x00010afa: /Users/dawn/tmp/x.cpp:17 [...] 0x00010cc0: /Users/dawn/tmp/x.cpp:6 0x00010ccb: /Users/dawn/tmp/x.cpp:8 [...] 0x00010d20: /Users/dawn/tmp/./x.h:10 0x00010d2c: /Users/dawn/tmp/./x.h:10 0x00010d3b: /Users/dawn/tmp/./x.h:10 Whereas dumping the line entries gives you entries after they've been interpreted and sorted by lldb, and will not include any files other than the one(s) asked for: (lldb) target modules du line-entries x.h Lines for file x.h in compilation unit x.cpp in `x [0x00010d00-0x00010d10): /Users/dawn/tmp/./x.h:10 [0x00010d10-0x00010d1b): /Users/dawn/tmp/./x.h:10 [0x00010d20-0x00010d2c): /Users/dawn/tmp/./x.h:10 [0x00010d2c-0x00010d3b): /Users/dawn/tmp/./x.h:10 (lldb) target modules du line-entries x.cpp Lines for file x.cpp in compilation unit x.cpp in `x [0x00010cc0-0x00010ccb): /Users/dawn/tmp/x.cpp:6 [0x00010ccb-0x00010cdd): /Users/dawn/tmp/x.cpp:8 [0x00010cdd-0x00010cf1): /Users/dawn/tmp/x.cpp:9 [0x00010aa0-0x00010ab6): /Users/dawn/tmp/x.cpp:12 [0x00010ab6-0x00010af2): /Users/dawn/tmp/x.cpp:14 [...] I'm fine with combining the two if we can find an interface that makes sense. 'line-table' is not appropriate for the new command, and '\-\-search\-for\-inlines' doesn't convey the differences. We could change 'line-table' to 'lines', but then what? Repository: rL LLVM http://reviews.llvm.org/D15593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255863 - Don't strip types of their typedefs when getting function types.
Author: gclayton Date: Wed Dec 16 18:58:41 2015 New Revision: 255863 URL: http://llvm.org/viewvc/llvm-project?rev=255863&view=rev Log: Don't strip types of their typedefs when getting function types. 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=255863&r1=255862&r2=255863&view=diff == --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Dec 16 18:58:41 2015 @@ -4217,7 +4217,7 @@ ClangASTContext::GetFunctionArgumentType { if (type) { -const clang::FunctionProtoType* func = llvm::dyn_cast(GetCanonicalQualType(type)); +const clang::FunctionProtoType* func = llvm::dyn_cast(GetQualType(type)); if (func) { const uint32_t num_args = func->getNumParams(); @@ -4233,7 +4233,7 @@ ClangASTContext::GetFunctionReturnType ( { if (type) { -clang::QualType qual_type(GetCanonicalQualType(type)); +clang::QualType qual_type(GetQualType(type)); const clang::FunctionProtoType* func = llvm::dyn_cast(qual_type.getTypePtr()); if (func) return CompilerType(getASTContext(), func->getReturnType()); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255864 - Don't demangle a name when Mangled::GetName() is called with ePreferMangled. Only demangle if this isn't the the value for the "preference" argument indicating the user
Author: gclayton Date: Wed Dec 16 19:00:50 2015 New Revision: 255864 URL: http://llvm.org/viewvc/llvm-project?rev=255864&view=rev Log: Don't demangle a name when Mangled::GetName() is called with ePreferMangled. Only demangle if this isn't the the value for the "preference" argument indicating the user wants the demangled name. This will stop a lot of symbols from being demangled when parsing the symbol table in ObjectFileMachO. Modified: lldb/trunk/source/Core/Mangled.cpp Modified: lldb/trunk/source/Core/Mangled.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=255864&r1=255863&r2=255864&view=diff == --- lldb/trunk/source/Core/Mangled.cpp (original) +++ lldb/trunk/source/Core/Mangled.cpp Wed Dec 16 19:00:50 2015 @@ -362,6 +362,9 @@ Mangled::NameMatches (const RegularExpre ConstString Mangled::GetName (lldb::LanguageType language, Mangled::NamePreference preference) const { +if (preference == ePreferMangled && m_mangled) +return m_mangled; + ConstString demangled = GetDemangledName(language); if (preference == ePreferDemangledWithoutArguments) @@ -376,12 +379,7 @@ Mangled::GetName (lldb::LanguageType lan return demangled; return m_mangled; } -else -{ -if (m_mangled) -return m_mangled; -return demangled; -} +return demangled; } //-- ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
jingham added a comment. Okay. So it seems like there are a couple of orthogonal differences here. 1. The current behavior requires that the the source file you pass in be a compile unit. We don't search inside the line tables. So for instance target modules dump line-tables foo.h would currently not dump anything. 2. We dump the whole line table for the given file, not just the lines from that file. 3. We show raw vrs. cooked line entries. So it seems like your change is adding three flags --compile-unit-only --only-explicit-matches --show-raw or something. The current behavior is: --compile-unit-only true --only-explicit-matches false --show-raw true and your command does: --compile-unit-only false --only-explicit-matches true --show-raw false Does that seem right. If so, then we have to decide whether it is worth the effort to be able to tweak these three independently. Repository: rL LLVM http://reviews.llvm.org/D15593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255868 - Set the minimum stack size for private state thread to 8MB
Author: kate Date: Wed Dec 16 19:37:00 2015 New Revision: 255868 URL: http://llvm.org/viewvc/llvm-project?rev=255868&view=rev Log: Set the minimum stack size for private state thread to 8MB Demangling complex Boost symbols can exhaust the default stack size. In practice, any thread that calls into LLDB functionality that touches symbols runs this risk. Guaranteeing a reasonable minimum for our own private state thread addressees some known scenarios debugging processes that make use of cpp-netlib. Modified: lldb/trunk/source/Target/Process.cpp Modified: lldb/trunk/source/Target/Process.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=255868&r1=255867&r2=255868&view=diff == --- lldb/trunk/source/Target/Process.cpp (original) +++ lldb/trunk/source/Target/Process.cpp Wed Dec 16 19:37:00 2015 @@ -4070,7 +4070,7 @@ Process::StartPrivateStateThread (bool i // Create the private state thread, and start it running. PrivateStateThreadArgs args = {this, is_secondary_thread}; -m_private_state_thread = ThreadLauncher::LaunchThread(thread_name, Process::PrivateStateThread, (void *) &args, NULL); +m_private_state_thread = ThreadLauncher::LaunchThread(thread_name, Process::PrivateStateThread, (void *) &args, NULL, 8 * 1024 * 1024); if (m_private_state_thread.IsJoinable()) { ResumePrivateStateThread(); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
dawn added a comment. In http://reviews.llvm.org/D15593#312665, @jingham wrote: > So it seems like your change is adding three flags > > --compile-unit-only --only-explicit-matches --show-raw > > or something. The current behavior is: > > --compile-unit-only true --only-explicit-matches false --show-raw true > > and your command does: > > --compile-unit-only false --only-explicit-matches true --show-raw false > > Does that seem right. Yup. > If so, then we have to decide whether it is worth the effort to be able to > tweak these three independently. I think these flags only make sense if you could tweak them independently, but to support something like: --compile-unit-only false --only-explicit-matches true --show-raw *true* would be a major pain - it would mean adding a lot of extra code and interfaces for something that would only be used by this one command. I think it's better to just have both: target modules line-tables target modules line-entries and if we find a need for any other combinations of the options you proposed, we can merge them at that time. Thoughts? Repository: rL LLVM http://reviews.llvm.org/D15593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
jingham added a comment. Provided we error out appropriately I don't think we need to support all possible combinations of options. I'd happier doing it by options and not supporting the combinations that aren't worth the effort. Then if anybody really needs one of the unsupported ones, the path to adding the support will be straight-forward, even if tedious. The options seem to me to actually explain what the variants do, whereas the two names are not going to be meaningful enough to most folks to do more than cause confusion (and force me to have to type "line-t" or "line-e".) Repository: rL LLVM http://reviews.llvm.org/D15593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
dawn added a comment. I'm only going to support the combinations: --compile-unit-only true --only-explicit-matches false --show-raw true --compile-unit-only false --only-explicit-matches true --show-raw false OK? Repository: rL LLVM http://reviews.llvm.org/D15593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
jingham added a comment. That seems fine for now. Note, if you use the OptionGroupOptions way of defining the new options for your command, then you can call OptionsSeen to tell you which options were actually provided by the user, so for extra credit, if --compile-unit-only is true and no other options were provided, you can set the other options to the correct values, and ditto when --compile-unit-only is false. That way for now you would only have to provide --compile-unit-only, and the others would be set to the supported combo, but if they provided an unsupported combo you could report the error appropriately. You can also get the same effect in the table driven way of defining options by just manually marking which options have been seen in your command's SetOptionValue (just remember to clear this info in the OptionParsingStarting method. Jim Repository: rL LLVM http://reviews.llvm.org/D15593 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines.
That seems fine for now. Note, if you use the OptionGroupOptions way of defining the new options for your command, then you can call OptionsSeen to tell you which options were actually provided by the user, so for extra credit, if --compile-unit-only is true and no other options were provided, you can set the other options to the correct values, and ditto when --compile-unit-only is false. That way for now you would only have to provide --compile-unit-only, and the others would be set to the supported combo, but if they provided an unsupported combo you could report the error appropriately. You can also get the same effect in the table driven way of defining options by just manually marking which options have been seen in your command's SetOptionValue (just remember to clear this info in the OptionParsingStarting method. Jim > On Dec 16, 2015, at 6:18 PM, Dawn Perchik wrote: > > dawn added a comment. > > I'm only going to support the combinations: > > --compile-unit-only true --only-explicit-matches false --show-raw true > --compile-unit-only false --only-explicit-matches true --show-raw false > > OK? > > > Repository: > rL LLVM > > http://reviews.llvm.org/D15593 > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255880 - test infra: force rerun to use parallel runner
Author: tfiala Date: Thu Dec 17 00:55:50 2015 New Revision: 255880 URL: http://llvm.org/viewvc/llvm-project?rev=255880&view=rev Log: test infra: force rerun to use parallel runner We've now seen the rerun test phase hang in a few scenarios. Eliminate the serial test runner (which is not exercised nearly as much as the others), by using a multi-worker test runner strategy with a single worker. This should rule out whether this is related to the serial test runner strategy. 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=255880&r1=255879&r2=255880&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dosep.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dosep.py Thu Dec 17 00:55:50 2015 @@ -1469,7 +1469,11 @@ def rerun_tests(test_subdir, tests_for_r # Do not update legacy counts, I am getting rid of # them so no point adding complicated merge logic here. rerun_thread_count = 1 -rerun_runner_name = default_test_runner_name(rerun_thread_count) +# Force the parallel test runner to choose a multi-worker strategy. +rerun_runner_name = default_test_runner_name(rerun_thread_count + 1) +print("rerun will use the '{}' test runner strategy".format( +rerun_runner_name)) + runner_strategies_by_name = get_test_runner_strategies(rerun_thread_count) rerun_runner_func = runner_strategies_by_name[ rerun_runner_name] ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15533: Make the aarch64 lldb-server capable of debugging arm32 applications
omjavaid added a comment. I am wondering whats the reason of replacing arm ptrace calls with aarch64 specific calls that use iovec parameters. If arm calls can work then may be dont use aarch64 specific calls at all. If they dont work kindly make relevant changes to NativeRegisterContextLinux_arm::WriteHardwareDebugRegs and NativeRegisterContextLinux_arm::ReadHardwareDebugInfo(). I guess these functions will throw same errors in case calls propagated using aarch64 lib interface and not backward compaitible with arm specific interface. http://reviews.llvm.org/D15533 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15593: Enhance "target modules dump line " and use it to fix MI's -symbol-list-lines.
dawn retitled this revision from "Add "target modules dump line-entries " command and use it to fix MI's -symbol-list-lines." to "Enhance "target modules dump line " and use it to fix MI's -symbol-list-lines.". dawn updated the summary for this revision. dawn updated this revision to Diff 43103. Repository: rL LLVM http://reviews.llvm.org/D15593 Files: packages/Python/lldbsuite/test/help/TestHelp.py packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py packages/Python/lldbsuite/test/tools/lldb-mi/symbol/symbol_list_lines_inline_test.h source/Commands/CommandObjectTarget.cpp tools/lldb-mi/MICmdCmdSymbol.cpp Index: tools/lldb-mi/MICmdCmdSymbol.cpp === --- tools/lldb-mi/MICmdCmdSymbol.cpp +++ tools/lldb-mi/MICmdCmdSymbol.cpp @@ -82,11 +82,7 @@ CMICMDBASE_GETOPTION(pArgFile, File, m_constStrArgNameFile); const CMIUtilString &strFilePath(pArgFile->GetValue()); -// FIXME: this won't work for header files! To try and use existing -// commands to get this to work for header files would be too slow. -// Instead, this code should be rewritten to use APIs and/or support -// should be added to lldb which would work for header files. -const CMIUtilString strCmd(CMIUtilString::Format("target modules dump line-table \"%s\"", strFilePath.AddSlashes().c_str())); +const CMIUtilString strCmd(CMIUtilString::Format("target modules dump lines -u false -e true -r false \"%s\"", strFilePath.AddSlashes().c_str())); CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()); const lldb::ReturnStatus rtn = rSessionInfo.GetDebugger().GetCommandInterpreter().HandleCommand(strCmd.c_str(), m_lldbResult); @@ -110,10 +106,10 @@ { // Match LineEntry using regex. static MIUtilParse::CRegexParser g_lineentry_header_regex( -"^ *Line table for (.+) in `(.+)$"); -// ^1=file ^2=module +"^ *Lines for file (.+) in compilation unit (.+) in `(.+)$"); +// ^1=file ^2=cu^3=module -MIUtilParse::CRegexParser::Match match(3); +MIUtilParse::CRegexParser::Match match(4); const bool ok = g_lineentry_header_regex.Execute(input, match); if (ok) @@ -146,12 +142,12 @@ // Match LineEntry using regex. static MIUtilParse::CRegexParser g_lineentry_nocol_regex( -"^ *(0x[0-9a-fA-F]+): (.+):([0-9]+)$"); +"^ *\\[(0x[0-9a-fA-F]+)-(0x[0-9a-fA-F]+)\\): (.+):([0-9]+)$"); static MIUtilParse::CRegexParser g_lineentry_col_regex( -"^ *(0x[0-9a-fA-F]+): (.+):([0-9]+):[0-9]+$"); -// ^1=addr ^2=f ^3=line ^4=:col(opt) +"^ *\\[(0x[0-9a-fA-F]+)-(0x[0-9a-fA-F]+)\\): (.+):([0-9]+):[0-9]+$"); +// ^1=start ^2=end ^3=f ^4=line ^5=:col(opt) -MIUtilParse::CRegexParser::Match match(5); +MIUtilParse::CRegexParser::Match match(6); // First try matching the LineEntry with the column, // then try without the column. @@ -160,8 +156,8 @@ if (ok) { addr = match.GetMatchAtIndex(1); -file = match.GetMatchAtIndex(2); -line = match.GetMatchAtIndex(3); +file = match.GetMatchAtIndex(3); +line = match.GetMatchAtIndex(4); } return ok; } @@ -222,10 +218,6 @@ if (!ParseLLDBLineAddressEntry(rLine.c_str(), strAddr, strFile, strLine)) continue; -// Skip entries which don't match the desired source. -if (strWantFile != strFile) -continue; - const CMICmnMIValueConst miValueConst(strAddr); const CMICmnMIValueResult miValueResult("pc", miValueConst); CMICmnMIValueTuple miValueTuple(miValueResult); Index: source/Commands/CommandObjectTarget.cpp === --- source/Commands/CommandObjectTarget.cpp +++ source/Commands/CommandObjectTarget.cpp @@ -1485,39 +1485,120 @@ } static uint32_t -DumpCompileUnitLineTable (CommandInterpreter &interpreter, - Stream &strm, - Module *module, - const FileSpec &file_spec, - bool load_addresses) +DumpFileLines (CommandInterpreter &interpreter, + Stream &strm, + Module *module, + const FileSpec &file_spec, + bool load_addresses, + bool compile_unit_only, + bool explicit_matches_only, + bool show_raw) { uint32_t num_matches = 0; if (module) { -SymbolContextList sc_list; -num_matches = module->ResolveSymbolContextsForFileSpec (file_spec, -0, -false, -