[Lldb-commits] [lldb] r271970 - Add support for using armv7 compact unwind information
Author: jmolenda Date: Mon Jun 6 21:19:54 2016 New Revision: 271970 URL: http://llvm.org/viewvc/llvm-project?rev=271970=rev Log: Add support for using armv7 compact unwind information as an asynchronous unwind plan source. Two small fixes to the compact unwind dumper tool for armv7 encodings. A change to DWARFCallFrameInfo to strip the 0th bit on addresses in eh_frame sections when armv7. In the clang generated examples I have, the 0th bit is set for thumb functions and that's causing the unwinder to pick the wrong function for eh_frame info. Modified: lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h lldb/trunk/source/Symbol/CompactUnwindInfo.cpp lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp lldb/trunk/tools/compact-unwind/compact-unwind-dumper.c Modified: lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h?rev=271970=271969=271970=diff == --- lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h (original) +++ lldb/trunk/include/lldb/Symbol/CompactUnwindInfo.h Mon Jun 6 21:19:54 2016 @@ -136,6 +136,9 @@ private: bool CreateUnwindPlan_arm64 (Target , FunctionInfo _info, UnwindPlan _plan, Address pc_or_function_start); +bool +CreateUnwindPlan_armv7 (Target , FunctionInfo _info, UnwindPlan _plan, Address pc_or_function_start); + ObjectFile _objfile; lldb::SectionSP m_section_sp; lldb::DataBufferSP m_section_contents_if_encrypted; // if the binary is encrypted, read the sect contents Modified: lldb/trunk/source/Symbol/CompactUnwindInfo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompactUnwindInfo.cpp?rev=271970=271969=271970=diff == --- lldb/trunk/source/Symbol/CompactUnwindInfo.cpp (original) +++ lldb/trunk/source/Symbol/CompactUnwindInfo.cpp Mon Jun 6 21:19:54 2016 @@ -104,24 +104,49 @@ namespace lldb_private { FLAGS_ANONYMOUS_ENUM() { - UNWIND_ARM64_MODE_MASK = 0x0F00, - UNWIND_ARM64_MODE_FRAMELESS= 0x0200, - UNWIND_ARM64_MODE_DWARF= 0x0300, - UNWIND_ARM64_MODE_FRAME= 0x0400, - - UNWIND_ARM64_FRAME_X19_X20_PAIR= 0x0001, - UNWIND_ARM64_FRAME_X21_X22_PAIR= 0x0002, - UNWIND_ARM64_FRAME_X23_X24_PAIR= 0x0004, - UNWIND_ARM64_FRAME_X25_X26_PAIR= 0x0008, - UNWIND_ARM64_FRAME_X27_X28_PAIR= 0x0010, - UNWIND_ARM64_FRAME_D8_D9_PAIR = 0x0100, - UNWIND_ARM64_FRAME_D10_D11_PAIR= 0x0200, - UNWIND_ARM64_FRAME_D12_D13_PAIR= 0x0400, - UNWIND_ARM64_FRAME_D14_D15_PAIR= 0x0800, +UNWIND_ARM64_MODE_MASK = 0x0F00, +UNWIND_ARM64_MODE_FRAMELESS= 0x0200, +UNWIND_ARM64_MODE_DWARF= 0x0300, +UNWIND_ARM64_MODE_FRAME= 0x0400, + +UNWIND_ARM64_FRAME_X19_X20_PAIR= 0x0001, +UNWIND_ARM64_FRAME_X21_X22_PAIR= 0x0002, +UNWIND_ARM64_FRAME_X23_X24_PAIR= 0x0004, +UNWIND_ARM64_FRAME_X25_X26_PAIR= 0x0008, +UNWIND_ARM64_FRAME_X27_X28_PAIR= 0x0010, +UNWIND_ARM64_FRAME_D8_D9_PAIR = 0x0100, +UNWIND_ARM64_FRAME_D10_D11_PAIR= 0x0200, +UNWIND_ARM64_FRAME_D12_D13_PAIR= 0x0400, +UNWIND_ARM64_FRAME_D14_D15_PAIR= 0x0800, - UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK = 0x00FFF000, - UNWIND_ARM64_DWARF_SECTION_OFFSET = 0x00FF, +UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK = 0x00FFF000, +UNWIND_ARM64_DWARF_SECTION_OFFSET = 0x00FF, }; + +FLAGS_ANONYMOUS_ENUM() +{ +UNWIND_ARM_MODE_MASK = 0x0F00, +UNWIND_ARM_MODE_FRAME= 0x0100, +UNWIND_ARM_MODE_FRAME_D = 0x0200, +UNWIND_ARM_MODE_DWARF= 0x0400, + +UNWIND_ARM_FRAME_STACK_ADJUST_MASK = 0x00C0, + +UNWIND_ARM_FRAME_FIRST_PUSH_R4 = 0x0001, +UNWIND_ARM_FRAME_FIRST_PUSH_R5 = 0x0002, +UNWIND_ARM_FRAME_FIRST_PUSH_R6 = 0x0004, + +UNWIND_ARM_FRAME_SECOND_PUSH_R8 = 0x0008, +UNWIND_ARM_FRAME_SECOND_PUSH_R9 = 0x0010, +UNWIND_ARM_FRAME_SECOND_PUSH_R10 = 0x0020, +UNWIND_ARM_FRAME_SECOND_PUSH_R11 = 0x0040, +
[Lldb-commits] LLVM buildmaster will be restarted tonight
Hello everyone, LLVM buildmaster will be updated and restarted after 6 PM Pacific time today. Thanks Galina ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] Buildbot numbers for the last week of 5/29/2016 - 6/04/2016
Hello everyone, Below are some buildbot numbers for the last week of 5/29/2016 - 6/04/2016. I added new statistics with a longest time each builder was red during the last week. Thanks Galina buildername| was_red ---+--- lldb-amd64-ninja-freebsd11| 127:35:48 lldb-x86-windows-msvc2015 | 59:50:06 clang-cmake-aarch64-full | 55:23:35 clang-native-arm-lnt | 51:46:54 clang-cmake-aarch64-quick | 51:15:59 clang-ppc64le-linux-lnt | 51:09:46 clang-ppc64be-linux-lnt | 51:06:10 lldb-x86_64-ubuntu-14.04-buildserver | 44:38:46 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only | 29:25:21 clang-x64-ninja-win7 | 29:21:27 sanitizer-windows | 25:33:14 clang-atom-d525-fedora-rel| 24:35:03 perf-x86_64-penryn-O3 | 21:52:44 clang-x86-win2008-selfhost| 21:43:03 perf-x86_64-penryn-O3-polly | 18:19:52 perf-x86_64-penryn-O3-polly-unprofitable | 17:18:59 sanitizer-x86_64-linux| 15:54:00 polly-amd64-linux | 15:17:59 clang-cmake-mipsel| 14:17:09 perf-x86_64-penryn-O3-polly-fast | 11:54:11 clang-cmake-mips | 10:53:16 clang-cmake-armv7-a15-selfhost-neon | 10:52:14 clang-cmake-thumbv7-a15-full-sh | 10:29:41 clang-ppc64be-linux-multistage| 10:13:14 clang-ppc64be-linux | 09:43:42 clang-s390x-linux | 09:38:57 llvm-mips-linux | 09:32:24 clang-ppc64le-linux-multistage| 08:14:25 lldb-x86_64-ubuntu-14.04-android | 07:59:04 sanitizer-x86_64-linux-fast | 07:35:17 lldb-windows7-android | 07:34:49 lldb-x86_64-ubuntu-14.04-cmake| 07:05:09 sanitizer-x86_64-linux-bootstrap | 06:49:43 lldb-x86_64-darwin-13.4 | 06:45:12 sanitizer-x86_64-linux-autoconf | 06:30:49 libcxx-libcxxabi-x86_64-linux-debian-noexceptions | 05:47:43 clang-cmake-armv7-a15-selfhost| 05:16:15 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 04:23:52 sanitizer-ppc64le-linux | 03:52:34 clang-cmake-armv7-a15 | 03:28:39 clang-cmake-armv7-a15-full| 02:50:25 lldb-amd64-ninja-netbsd7 | 02:03:29 sanitizer-x86_64-linux-fuzzer | 02:03:04 clang-cmake-thumbv7-a15 | 01:33:30 libcxx-libcxxabi-arm-linux| 01:25:26 clang-ppc64le-linux | 01:19:53 sanitizer-ppc64be-linux | 01:17:50 clang-x86_64-linux-selfhost-modules | 01:07:57 llvm-sphinx-docs | 01:07:31 llvm-clang-lld-x86_64-debian-fast | 00:59:48 clang-x86_64-debian-fast | 00:59:21 clang-hexagon-elf | 00:51:32 llvm-hexagon-elf | 00:48:00 clang-sphinx-docs | 00:47:34 clang-x86_64-linux-abi-test | 00:40:39 perf-x86_64-penryn-O3-polly-parallel-fast | 00:39:01 clang-bpf-build | 00:38:22 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast| 00:33:22 lld-x86_64-darwin13 | 00:28:24 lld-x86_64-win7 | 00:24:56 libcxx-libcxxabi-x86_64-linux-ubuntu-asan | 00:17:19 (61 rows) "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green): buildername| builds | changes | status change ratio ++-+- perf-x86_64-penryn-O3-polly
Re: [Lldb-commits] [PATCH] D21032: Eliminate differences in lldbinline-generated Makefiles and ensure they're regenerated every time
tfiala accepted this revision. tfiala added a comment. This revision is now accepted and ready to land. Looks good, Sean! Repository: rL LLVM http://reviews.llvm.org/D21032 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17856: Fix expression evaluation with operator new
labath added a comment. Sean, could you find some time to look at this please? http://reviews.llvm.org/D17856 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D21032: Eliminate differences in lldbinline-generated Makefiles and ensure they're regenerated every time
spyffe created this revision. spyffe added a reviewer: tfiala. spyffe added a subscriber: lldb-commits. spyffe set the repository for this revision to rL LLVM. To eliminate problems where 'lldbinline.py'-generated Makefiles are re-used, I've standardized the generation of them. The testsuite now asserts if there is a discrepancy between what is there and what 'lldbinline.py' would generate. I've also eliminated all cases where what is there is legitimately different from what 'lldbinline.py' would generate. Repository: rL LLVM http://reviews.llvm.org/D21032 Files: packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile packages/Python/lldbsuite/test/lang/c/struct_types/Makefile packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile packages/Python/lldbsuite/test/lldbinline.py packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile Index: packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile === --- packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile +++ packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile @@ -1,4 +1,13 @@ LEVEL = ../../make CXX_SOURCES := main.cpp CXXFLAGS += -std=c++11 +ifneq (,$(findstring clang,$(CC))) +CFLAGS_EXTRAS += -fno-limit-debug-info +endif + include $(LEVEL)/Makefile.rules + + +cleanup: + rm -f Makefile *.d + Index: packages/Python/lldbsuite/test/lldbinline.py === --- packages/Python/lldbsuite/test/lldbinline.py +++ packages/Python/lldbsuite/test/lldbinline.py @@ -2,7 +2,9 @@ from __future__ import absolute_import # System modules +import filecmp import os +import sys # Third-party modules @@ -89,9 +91,6 @@ return "-N dsym %s" % (self.mydir) def BuildMakefile(self): -if os.path.exists("Makefile"): -return - categories = {} for f in os.listdir(os.getcwd()): @@ -102,7 +101,7 @@ else: categories[t] = [f] -makefile = open("Makefile", 'w+') +makefile = open("Makefile.tmp", 'w+') level = os.sep.join([".."] * len(self.mydir.split(os.sep))) + os.sep + "make" @@ -118,11 +117,26 @@ if ('CXX_SOURCES' in list(categories.keys())): makefile.write("CXXFLAGS += -std=c++11\n") -makefile.write("include $(LEVEL)/Makefile.rules\n") +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. + +makefile.write("ifneq (,$(findstring clang,$(CC)))\n") +makefile.write("CFLAGS_EXTRAS += -fno-limit-debug-info\n") +makefile.write("endif\n\n") + +makefile.write("include $(LEVEL)/Makefile.rules\n\n") + makefile.write("\ncleanup:\n\trm -f Makefile *.d\n\n") makefile.flush() makefile.close() +if os.path.exists("Makefile"): +if not filecmp.cmp("Makefile", "Makefile.tmp"): +sys.exit("Existing Makefile doesn't match generated Makefile!") + +os.rename("Makefile.tmp", "Makefile") + @skipUnlessDarwin def __test_with_dsym(self): self.using_dsym = True Index: packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile === --- packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile +++ packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile @@ -1,6 +1,13 @@ LEVEL = ../../../make - OBJC_SOURCES := main.m LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +ifneq (,$(findstring clang,$(CC))) +CFLAGS_EXTRAS += -fno-limit-debug-info +endif include $(LEVEL)/Makefile.rules + + +cleanup: + rm -f Makefile *.d + Index: packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile === --- packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile +++ packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile @@ -1,3 +1,13 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp +CXXFLAGS += -std=c++11 +ifneq (,$(findstring clang,$(CC))) +CFLAGS_EXTRAS += -fno-limit-debug-info +endif + include $(LEVEL)/Makefile.rules + + +cleanup: + rm -f Makefile *.d + Index: packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
Re: [Lldb-commits] [PATCH] D20990: Don't remove PIE executables when using svr4 packets
This revision was automatically updated to reflect the committed changes. Closed by commit rL271899: Don't remove PIE executables when using svr4 packets (authored by fjricci). Changed prior to commit: http://reviews.llvm.org/D20990?vs=59637=59723#toc Repository: rL LLVM http://reviews.llvm.org/D20990 Files: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp === --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -4875,11 +4875,10 @@ found = true; } -if (!found) +// The main executable will never be included in libraries-svr4, don't remove it +if (!found && loaded_module.get() != target.GetExecutableModulePointer()) { -lldb_private::ObjectFile * obj = loaded_module->GetObjectFile (); -if (obj && obj->GetType () != ObjectFile::Type::eTypeExecutable) -removed_modules.Append (loaded_module); +removed_modules.Append (loaded_module); } } Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp === --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -4875,11 +4875,10 @@ found = true; } -if (!found) +// The main executable will never be included in libraries-svr4, don't remove it +if (!found && loaded_module.get() != target.GetExecutableModulePointer()) { -lldb_private::ObjectFile * obj = loaded_module->GetObjectFile (); -if (obj && obj->GetType () != ObjectFile::Type::eTypeExecutable) -removed_modules.Append (loaded_module); +removed_modules.Append (loaded_module); } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r271899 - Don't remove PIE executables when using svr4 packets
Author: fjricci Date: Mon Jun 6 10:00:50 2016 New Revision: 271899 URL: http://llvm.org/viewvc/llvm-project?rev=271899=rev Log: Don't remove PIE executables when using svr4 packets Summary: Because PIE executables have an e_type of llvm::ELF::ET_DYN, they are not of type eTypeExecutable, and were being removed when svr4 packets were used. Reviewers: clayborg, ADodds, tfiala, sas Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20990 Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=271899=271898=271899=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Jun 6 10:00:50 2016 @@ -4875,11 +4875,10 @@ ProcessGDBRemote::LoadModules (LoadedMod found = true; } -if (!found) +// The main executable will never be included in libraries-svr4, don't remove it +if (!found && loaded_module.get() != target.GetExecutableModulePointer()) { -lldb_private::ObjectFile * obj = loaded_module->GetObjectFile (); -if (obj && obj->GetType () != ObjectFile::Type::eTypeExecutable) -removed_modules.Append (loaded_module); +removed_modules.Append (loaded_module); } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r271876 - (Minor tweak) Make RegisterContextWindows_x86/x64::GetRegisterInfoAtIndex
Author: carlokok Date: Mon Jun 6 04:40:27 2016 New Revision: 271876 URL: http://llvm.org/viewvc/llvm-project?rev=271876=rev Log: (Minor tweak) Make RegisterContextWindows_x86/x64::GetRegisterInfoAtIndex return NULL for an invalid register. The unwind logic asks for the "return address register" which doesn't exist on x86/x86_64, returns -1 and calls this with -1 as a parameter, ends up out of scope of the array bounds for g_register_infos and later SIGSEGVs on accessing. This now matches the other GetRegisterInfoAtIndex for other platforms. Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp?rev=271876=271875=271876=diff == --- lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp Mon Jun 6 04:40:27 2016 @@ -136,6 +136,8 @@ RegisterInfo g_register_infos[] = { nullptr}, }; +static size_t k_num_register_infos = llvm::array_lengthof(g_register_infos); + // Array of lldb register numbers used to define the set of all General Purpose Registers uint32_t g_gpr_reg_indices[] = {eRegisterIndexRax, eRegisterIndexRbx, eRegisterIndexRcx, eRegisterIndexRdx, eRegisterIndexRdi, eRegisterIndexRsi, eRegisterIndexR8, eRegisterIndexR9, @@ -169,7 +171,9 @@ RegisterContextWindows_x64::GetRegisterC const RegisterInfo * RegisterContextWindows_x64::GetRegisterInfoAtIndex(size_t reg) { -return _register_infos[reg]; +if (reg < k_num_register_infos) +return _register_infos[reg]; +return NULL; } size_t Modified: lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp?rev=271876=271875=271876=diff == --- lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp (original) +++ lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp Mon Jun 6 04:40:27 2016 @@ -64,6 +64,7 @@ RegisterInfo g_register_infos[] = { DEFINE_GPR(eip,"pc"), { ehframe_eip_i386, dwarf_eip_i386, LLDB_REGNUM_GENERIC_PC,LLDB_INVALID_REGNUM, lldb_eip_i386 }, nullptr, nullptr}, { DEFINE_GPR_BIN(eflags, "flags"), { ehframe_eflags_i386, dwarf_eflags_i386, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM, lldb_eflags_i386}, nullptr, nullptr}, }; +static size_t k_num_register_infos = llvm::array_lengthof(g_register_infos); // Array of lldb register numbers used to define the set of all General Purpose Registers uint32_t g_gpr_reg_indices[] = @@ -106,7 +107,9 @@ RegisterContextWindows_x86::GetRegisterC const RegisterInfo * RegisterContextWindows_x86::GetRegisterInfoAtIndex(size_t reg) { -return _register_infos[reg]; +if (reg < k_num_register_infos) +return _register_infos[reg]; +return NULL; } size_t ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits