[Lldb-commits] [lldb] f827b4b - [LLDB] Fix TestConvenienceVariables.test AArch64/Windows

Muhammad Omair Javaid via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 13 04:47:13 PDT 2022


Author: Muhammad Omair Javaid
Date: 2022-07-13T16:46:55+05:00
New Revision: f827b4b657d5922beef3799337e91ba98fce852e

URL: https://github.com/llvm/llvm-project/commit/f827b4b657d5922beef3799337e91ba98fce852e
DIFF: https://github.com/llvm/llvm-project/commit/f827b4b657d5922beef3799337e91ba98fce852e.diff

LOG: [LLDB] Fix TestConvenienceVariables.test AArch64/Windows

This patch fixes TestConvenienceVariables.test for AArch64 Windows.
Clang/LLD was unable to find printf apparently available as a macro
definition in stdio.h.

Added: 
    

Modified: 
    lldb/test/Shell/Driver/Inputs/hello.cpp
    lldb/test/Shell/Driver/TestConvenienceVariables.test

Removed: 
    


################################################################################
diff  --git a/lldb/test/Shell/Driver/Inputs/hello.cpp b/lldb/test/Shell/Driver/Inputs/hello.cpp
index 1ec0677aeb2c7..7a46e19b927a5 100644
--- a/lldb/test/Shell/Driver/Inputs/hello.cpp
+++ b/lldb/test/Shell/Driver/Inputs/hello.cpp
@@ -1,11 +1,6 @@
-// The build.py script always runs the compiler in C++ mode, regardless of the
-// file extension. This results in mangled names presented to the linker which
-// in turn cannot find the printf symbol.
-extern "C" {
-int printf(const char *format, ...);
+#include<stdio.h>
 
 int main(int argc, char **argv) {
   printf("Hello World\n");
   return 0;
 }
-}

diff  --git a/lldb/test/Shell/Driver/TestConvenienceVariables.test b/lldb/test/Shell/Driver/TestConvenienceVariables.test
index 63ba15ec7468c..45dc7673bfc51 100644
--- a/lldb/test/Shell/Driver/TestConvenienceVariables.test
+++ b/lldb/test/Shell/Driver/TestConvenienceVariables.test
@@ -19,7 +19,7 @@ CHECK-NEXT: SBProcess: pid = {{[0-9]+}}, state = stopped, threads = {{[0-9]+}},
 CHECK: script print(lldb.thread.GetStopDescription(100))
 CHECK-NEXT: breakpoint 1.1
 CHECK: script lldb.frame.GetLineEntry().GetLine()
-CHECK-NEXT: 8
+CHECK-NEXT: 4
 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
 CHECK-NEXT: hello.c
 CHECK: script lldb.frame.GetFunctionName()


        


More information about the lldb-commits mailing list