[Lldb-commits] [PATCH] D60648: [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.test
mgorny created this revision. mgorny added reviewers: labath, zturner, krytarowski. Do not use -nostdlib in target-symbols-add-unwind.test. NetBSD uses startup files to provide obligatory ELF notes in executables, and therefore using -nostdlib requires providing specially tailored input. Otherwise, kernel rejects the result as invalid executable. The replacement was suggested by Pavel Labath. https://reviews.llvm.org/D60648 Files: lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c lldb/lit/SymbolFile/target-symbols-add-unwind.test Index: lldb/lit/SymbolFile/target-symbols-add-unwind.test === --- lldb/lit/SymbolFile/target-symbols-add-unwind.test +++ lldb/lit/SymbolFile/target-symbols-add-unwind.test @@ -4,23 +4,23 @@ # UNSUPPORTED: system-windows, system-darwin # RUN: cd %T -# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -nostdlib -g \ +# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \ # RUN: -fno-unwind-tables -o target-symbols-add-unwind.debug # RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \ # RUN: target-symbols-add-unwind.stripped # RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s process launch --stop-at-entry -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK-NOT: debug_frame UnwindPlan: target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug # CHECK-LABEL: target symbols add # CHECK: symbol file {{.*}} has been added to {{.*}} -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK: debug_frame UnwindPlan: # CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI # CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes. Index: lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c === --- lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c +++ lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c @@ -1 +1 @@ -void _start() {} +int main() {} Index: lldb/lit/SymbolFile/target-symbols-add-unwind.test === --- lldb/lit/SymbolFile/target-symbols-add-unwind.test +++ lldb/lit/SymbolFile/target-symbols-add-unwind.test @@ -4,23 +4,23 @@ # UNSUPPORTED: system-windows, system-darwin # RUN: cd %T -# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -nostdlib -g \ +# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \ # RUN: -fno-unwind-tables -o target-symbols-add-unwind.debug # RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \ # RUN: target-symbols-add-unwind.stripped # RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s process launch --stop-at-entry -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK-NOT: debug_frame UnwindPlan: target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug # CHECK-LABEL: target symbols add # CHECK: symbol file {{.*}} has been added to {{.*}} -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK: debug_frame UnwindPlan: # CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI # CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes. Index: lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c === --- lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c +++ lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c @@ -1 +1 @@ -void _start() {} +int main() {} ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r358329 - [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.test
Author: mgorny Date: Sat Apr 13 02:49:39 2019 New Revision: 358329 URL: http://llvm.org/viewvc/llvm-project?rev=358329&view=rev Log: [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.test Do not use -nostdlib in target-symbols-add-unwind.test. NetBSD uses startup files to provide obligatory ELF notes in executables, and therefore using -nostdlib requires providing specially tailored input. Otherwise, kernel rejects the result as invalid executable. The replacement was suggested by Pavel Labath. Differential Revision: https://reviews.llvm.org/D60648 Modified: lldb/trunk/lit/SymbolFile/Inputs/target-symbols-add-unwind.c lldb/trunk/lit/SymbolFile/target-symbols-add-unwind.test Modified: lldb/trunk/lit/SymbolFile/Inputs/target-symbols-add-unwind.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/Inputs/target-symbols-add-unwind.c?rev=358329&r1=358328&r2=358329&view=diff == --- lldb/trunk/lit/SymbolFile/Inputs/target-symbols-add-unwind.c (original) +++ lldb/trunk/lit/SymbolFile/Inputs/target-symbols-add-unwind.c Sat Apr 13 02:49:39 2019 @@ -1 +1 @@ -void _start() {} +int main() {} Modified: lldb/trunk/lit/SymbolFile/target-symbols-add-unwind.test URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/target-symbols-add-unwind.test?rev=358329&r1=358328&r2=358329&view=diff == --- lldb/trunk/lit/SymbolFile/target-symbols-add-unwind.test (original) +++ lldb/trunk/lit/SymbolFile/target-symbols-add-unwind.test Sat Apr 13 02:49:39 2019 @@ -4,23 +4,23 @@ # UNSUPPORTED: system-windows, system-darwin # RUN: cd %T -# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -nostdlib -g \ +# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \ # RUN: -fno-unwind-tables -o target-symbols-add-unwind.debug # RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \ # RUN: target-symbols-add-unwind.stripped # RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s process launch --stop-at-entry -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK-NOT: debug_frame UnwindPlan: target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug # CHECK-LABEL: target symbols add # CHECK: symbol file {{.*}} has been added to {{.*}} -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK: debug_frame UnwindPlan: # CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI # CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes. ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D60648: [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.test
This revision was automatically updated to reflect the committed changes. Closed by commit rGfb70bc65fe18: [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.test (authored by mgorny). Herald added a project: LLDB. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60648/new/ https://reviews.llvm.org/D60648 Files: lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c lldb/lit/SymbolFile/target-symbols-add-unwind.test Index: lldb/lit/SymbolFile/target-symbols-add-unwind.test === --- lldb/lit/SymbolFile/target-symbols-add-unwind.test +++ lldb/lit/SymbolFile/target-symbols-add-unwind.test @@ -4,23 +4,23 @@ # UNSUPPORTED: system-windows, system-darwin # RUN: cd %T -# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -nostdlib -g \ +# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \ # RUN: -fno-unwind-tables -o target-symbols-add-unwind.debug # RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \ # RUN: target-symbols-add-unwind.stripped # RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s process launch --stop-at-entry -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK-NOT: debug_frame UnwindPlan: target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug # CHECK-LABEL: target symbols add # CHECK: symbol file {{.*}} has been added to {{.*}} -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK: debug_frame UnwindPlan: # CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI # CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes. Index: lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c === --- lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c +++ lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c @@ -1 +1 @@ -void _start() {} +int main() {} Index: lldb/lit/SymbolFile/target-symbols-add-unwind.test === --- lldb/lit/SymbolFile/target-symbols-add-unwind.test +++ lldb/lit/SymbolFile/target-symbols-add-unwind.test @@ -4,23 +4,23 @@ # UNSUPPORTED: system-windows, system-darwin # RUN: cd %T -# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -nostdlib -g \ +# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \ # RUN: -fno-unwind-tables -o target-symbols-add-unwind.debug # RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \ # RUN: target-symbols-add-unwind.stripped # RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s process launch --stop-at-entry -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK-NOT: debug_frame UnwindPlan: target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug # CHECK-LABEL: target symbols add # CHECK: symbol file {{.*}} has been added to {{.*}} -image show-unwind -n _start -# CHECK-LABEL: image show-unwind -n _start +image show-unwind -n main +# CHECK-LABEL: image show-unwind -n main # CHECK: debug_frame UnwindPlan: # CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI # CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes. Index: lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c === --- lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c +++ lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c @@ -1 +1 @@ -void _start() {} +int main() {} ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D60653: Correctly check if a warning message lacks a trailing new line
teemperor created this revision. teemperor added a reviewer: clayborg. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Fixes LLVM bug 41489. Repository: rLLDB LLDB https://reviews.llvm.org/D60653 Files: lldb/source/Core/Module.cpp Index: lldb/source/Core/Module.cpp === --- lldb/source/Core/Module.cpp +++ lldb/source/Core/Module.cpp @@ -1120,7 +1120,7 @@ const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogError, "%s", strm.GetData()); @@ -1152,7 +1152,7 @@ const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } strm.PutCString("The debug session should be aborted as the original " @@ -1178,7 +1178,7 @@ const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogWarning, "%s", strm.GetData()); Index: lldb/source/Core/Module.cpp === --- lldb/source/Core/Module.cpp +++ lldb/source/Core/Module.cpp @@ -1120,7 +1120,7 @@ const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogError, "%s", strm.GetData()); @@ -1152,7 +1152,7 @@ const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } strm.PutCString("The debug session should be aborted as the original " @@ -1178,7 +1178,7 @@ const int format_len = strlen(format); if (format_len > 0) { const char last_char = format[format_len - 1]; - if (last_char != '\n' || last_char != '\r') + if (last_char != '\n' && last_char != '\r') strm.EOL(); } Host::SystemLog(Host::eSystemLogWarning, "%s", strm.GetData()); ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D60654: Fix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShift
teemperor created this revision. teemperor added a reviewer: LLDB. Herald added subscribers: lldb-commits, kristof.beyls, javed.absar. Herald added a project: LLDB. As reported in LLVM bug 41487, the check in this function is wrong and should be the same as the described check in the comment (which is correctly copied from the ARM ISA reference). Repository: rLLDB LLDB https://reviews.llvm.org/D60654 Files: lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Index: lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp === --- lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -10150,7 +10150,7 @@ shift_t = DecodeRegShift(Bits32(opcode, 6, 5)); // if d == 15 || n == 15 || m == 15 || s == 15 then UNPREDICTABLE; - if ((d == 15) || (m == 15) || (m == 15) || (s == 15)) + if ((d == 15) || (n == 15) || (m == 15) || (s == 15)) return false; break; Index: lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp === --- lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -10150,7 +10150,7 @@ shift_t = DecodeRegShift(Bits32(opcode, 6, 5)); // if d == 15 || n == 15 || m == 15 || s == 15 then UNPREDICTABLE; - if ((d == 15) || (m == 15) || (m == 15) || (s == 15)) + if ((d == 15) || (n == 15) || (m == 15) || (s == 15)) return false; break; ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D60655: Fix typo in ArmUnwindInfo::GetUnwindPlan
teemperor created this revision. teemperor added a reviewer: LLDB. Herald added subscribers: lldb-commits, kristof.beyls, javed.absar. Herald added a project: LLDB. As reported in LLVM bug 41486, the check `(byte1 & 0xf8) == 0xc0` is wrong. We want to check for `11010nnn`, so the proper value we want to compare against is `0xd0` (`0xc0` would check for the value `11010nnn` which we already checked for above as described in the bug report). Repository: rLLDB LLDB https://reviews.llvm.org/D60655 Files: lldb/source/Symbol/ArmUnwindInfo.cpp Index: lldb/source/Symbol/ArmUnwindInfo.cpp === --- lldb/source/Symbol/ArmUnwindInfo.cpp +++ lldb/source/Symbol/ArmUnwindInfo.cpp @@ -304,7 +304,7 @@ // 11001yyy // Spare (yyy != 000, 001) return false; -} else if ((byte1 & 0xf8) == 0xc0) { +} else if ((byte1 & 0xf8) == 0xd0) { // 11010nnn // Pop VFP double-precision registers D[8]-D[8+nnn] saved (as if) by // FSTMFDD (see remark d) Index: lldb/source/Symbol/ArmUnwindInfo.cpp === --- lldb/source/Symbol/ArmUnwindInfo.cpp +++ lldb/source/Symbol/ArmUnwindInfo.cpp @@ -304,7 +304,7 @@ // 11001yyy // Spare (yyy != 000, 001) return false; -} else if ((byte1 & 0xf8) == 0xc0) { +} else if ((byte1 & 0xf8) == 0xd0) { // 11010nnn // Pop VFP double-precision registers D[8]-D[8+nnn] saved (as if) by // FSTMFDD (see remark d) ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D60655: Fix typo in ArmUnwindInfo::GetUnwindPlan
teemperor added a comment. Don't have the test for this and probably can't write one for it (as I don't have access to an ARM device for testing and don't really know the code so well). If anyone feels like providing a test, feel free to link it to this revision. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60655/new/ https://reviews.llvm.org/D60655 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D60654: Fix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShift
davide accepted this revision. davide added a comment. This revision is now accepted and ready to land. Add an unittest maybe? otherwise, seems to match the ISA so LGTM Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60654/new/ https://reviews.llvm.org/D60654 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits