[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.
Herald added a project: LLVM.

This definitely broke stand-alone builds:

  FAILED: tools/driver/Options.inc 
  cd /var/tmp/portage/dev-util/lldb-/work/lldb-_build && 
/usr/lib/llvm/9/bin/llvm-tblgen -gen-opt-parser-defs -I 
/var/tmp/portage/dev-util/lldb-/work/lldb-/tools/driver 
/var/tmp/portage/dev-util/lldb-/work/lldb-/tools/driver/Options.td -o 
tools/driver/Options.inc -d tools/driver/Options.inc.d
  
/var/tmp/portage/dev-util/lldb-/work/lldb-/tools/driver/Options.td:1:9: 
error: Could not find include file 'llvm/Option/OptParser.td'
  include "llvm/Option/OptParser.td"
  ^
  
/var/tmp/portage/dev-util/lldb-/work/lldb-/tools/driver/Options.td:1:9: 
error: Unexpected input at top level
  include "llvm/Option/OptParser.td"
  ^


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56531/new/

https://reviews.llvm.org/D56531



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments.



Comment at: lldb/trunk/cmake/modules/LLDBStandalone.cmake:20
+  # We set LLVM_MAIN_INCLUDE_DIR so that it gets included in TableGen flags.
+  set(LLVM_MAIN_INCLUDE_DIR "${LLVM_BUILD_MAIN_INCLUDE_DIR}" CACHE PATH "Path 
to LLVM's source include dir")
+  # We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when 
building SVNVersion.inc

Apparently the idea of using `LLVM_BUILD_MAIN_INCLUDE_DIR` is plain wrong here. 
The old code used the equivalent of `LLVM_INCLUDE_DIR` (i.e. the include dir of 
*installed* LLVM) and I think the new code should use the same. Given how long 
the old code was there, I suppose there shouldn't be any use case broken by 
using that directory.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56531/new/

https://reviews.llvm.org/D56531



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D57995: [lldb] [cmake] Use install directories for LLVM_* variables

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision.
mgorny added reviewers: sgraenitz, xiaobai, labath, zturner.
mgorny added a project: LLDB.

Restore the previous behavior of using install directories for
LLVM_MAIN_INCLUDE_DIR, LLVM_LIBRARY_DIR and LLVM_BINARY_DIR.  The update
from llvm-config to CMake has changed the values of those values to use
LLVM_BUILD_* which is plain wrong and breaks stand-alone builds.
Instead, use the CMake counterparts of the values returned
by llvm-config.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D57995

Files:
  lldb/cmake/modules/LLDBStandalone.cmake


Index: lldb/cmake/modules/LLDBStandalone.cmake
===
--- lldb/cmake/modules/LLDBStandalone.cmake
+++ lldb/cmake/modules/LLDBStandalone.cmake
@@ -20,9 +20,9 @@
   set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake 
modules")
 
   set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM 
source tree")
-  set(LLVM_MAIN_INCLUDE_DIR ${LLVM_BUILD_MAIN_INCLUDE_DIR} CACHE PATH "Path to 
llvm/include")
-  set(LLVM_LIBRARY_DIR ${LLVM_BUILD_LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
-  set(LLVM_BINARY_DIR ${LLVM_BUILD_BINARY_DIR} CACHE PATH "Path to LLVM build 
tree")
+  set(LLVM_MAIN_INCLUDE_DIR ${LLVM_INCLUDE_DIR} CACHE PATH "Path to 
llvm/include")
+  set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
+  set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
   set(LLVM_DEFAULT_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH 
"Path to llvm-lit")
 
   if(CMAKE_CROSSCOMPILING)


Index: lldb/cmake/modules/LLDBStandalone.cmake
===
--- lldb/cmake/modules/LLDBStandalone.cmake
+++ lldb/cmake/modules/LLDBStandalone.cmake
@@ -20,9 +20,9 @@
   set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules")
 
   set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
-  set(LLVM_MAIN_INCLUDE_DIR ${LLVM_BUILD_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
-  set(LLVM_LIBRARY_DIR ${LLVM_BUILD_LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
-  set(LLVM_BINARY_DIR ${LLVM_BUILD_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
+  set(LLVM_MAIN_INCLUDE_DIR ${LLVM_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
+  set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
+  set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
   set(LLVM_DEFAULT_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to llvm-lit")
 
   if(CMAKE_CROSSCOMPILING)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D56531: [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.

Submitted a fix as D57995 .


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56531/new/

https://reviews.llvm.org/D56531



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D57999: [lldb] [lldb-instr] Add missing linkage to ClangLex

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision.
mgorny added reviewers: JDevlieghere, labath.
mgorny added a project: LLDB.
Herald added subscribers: teemperor, abidh.

Fixes the following build error:

  
/usr/lib/gcc/x86_64-pc-linux-gnu/7.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: 
tools/lldb-instr/CMakeFiles/lldb-instr.dir/Instrument.cpp.o: undefined 
reference to symbol 
'_ZN5clang5Lexer19getLocForEndOfTokenENS_14SourceLocationEjRKNS_13SourceManagerERKNS_11LangOptionsE'
  /usr/lib/llvm/9/lib64/../lib64/libclangLex.so.9svn: error adding symbols: DSO 
missing from command line
  collect2: error: ld returned 1 exit status


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D57999

Files:
  lldb/tools/lldb-instr/CMakeLists.txt


Index: lldb/tools/lldb-instr/CMakeLists.txt
===
--- lldb/tools/lldb-instr/CMakeLists.txt
+++ lldb/tools/lldb-instr/CMakeLists.txt
@@ -5,6 +5,7 @@
 clangAST
 clangBasic
 clangFrontend
+clangLex
 clangTooling
 
   LINK_COMPONENTS


Index: lldb/tools/lldb-instr/CMakeLists.txt
===
--- lldb/tools/lldb-instr/CMakeLists.txt
+++ lldb/tools/lldb-instr/CMakeLists.txt
@@ -5,6 +5,7 @@
 clangAST
 clangBasic
 clangFrontend
+clangLex
 clangTooling
 
   LINK_COMPONENTS
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D57999: [lldb] [lldb-instr] Add missing linkage to clang libraries

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 186111.
mgorny retitled this revision from "[lldb] [lldb-instr] Add missing linkage to 
ClangLex" to "[lldb] [lldb-instr] Add missing linkage to clang libraries".
mgorny edited the summary of this revision.
mgorny added a comment.

That's the complete set.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57999/new/

https://reviews.llvm.org/D57999

Files:
  lldb/tools/lldb-instr/CMakeLists.txt


Index: lldb/tools/lldb-instr/CMakeLists.txt
===
--- lldb/tools/lldb-instr/CMakeLists.txt
+++ lldb/tools/lldb-instr/CMakeLists.txt
@@ -5,6 +5,9 @@
 clangAST
 clangBasic
 clangFrontend
+clangLex
+clangRewrite
+clangSerialization
 clangTooling
 
   LINK_COMPONENTS


Index: lldb/tools/lldb-instr/CMakeLists.txt
===
--- lldb/tools/lldb-instr/CMakeLists.txt
+++ lldb/tools/lldb-instr/CMakeLists.txt
@@ -5,6 +5,9 @@
 clangAST
 clangBasic
 clangFrontend
+clangLex
+clangRewrite
+clangSerialization
 clangTooling
 
   LINK_COMPONENTS
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D57999: [lldb] [lldb-instr] Add missing linkage to ClangLex

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny planned changes to this revision.
mgorny added a comment.

Expecting more.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57999/new/

https://reviews.llvm.org/D57999



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D58000: [lldb] [test] Skip lldb-mi test if LLDB_DISABLE_PYTHON is used

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision.
mgorny added reviewers: labath, zturner.
mgorny added a project: LLDB.
Herald added subscribers: abidh, ki.stfu.
Herald added a reviewer: serge-sans-paille.

Skip running lldb-mi tests when Python support is disabled.  This causes
lldb-mi to unconditionally fail, and therefore all the relevant tests
fail as well.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D58000

Files:
  lldb/lit/helper/toolchain.py
  lldb/lit/lit.site.cfg.py.in
  lldb/lit/tools/lldb-mi/breakpoint/break-insert-enable-pending.test
  lldb/lit/tools/lldb-mi/breakpoint/break-insert.test
  lldb/lit/tools/lldb-mi/data/data-info-line.test
  lldb/lit/tools/lldb-mi/exec/exec-continue.test
  lldb/lit/tools/lldb-mi/exec/exec-finish.test
  lldb/lit/tools/lldb-mi/exec/exec-interrupt.test
  lldb/lit/tools/lldb-mi/exec/exec-next-instruction.test
  lldb/lit/tools/lldb-mi/exec/exec-next.test
  lldb/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
  lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test
  lldb/lit/tools/lldb-mi/exec/exec-step.test
  lldb/lit/tools/lldb-mi/symbol/symbol-list-lines.test
  lldb/lit/tools/lldb-mi/target/target-select-so-path.test

Index: lldb/lit/tools/lldb-mi/target/target-select-so-path.test
===
--- lldb/lit/tools/lldb-mi/target/target-select-so-path.test
+++ lldb/lit/tools/lldb-mi/target/target-select-so-path.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # UNSUPPORTED: system-windows, system-darwin
 #
 # RUN: %clang -o %t %p/inputs/main.c -g
Index: lldb/lit/tools/lldb-mi/symbol/symbol-list-lines.test
===
--- lldb/lit/tools/lldb-mi/symbol/symbol-list-lines.test
+++ lldb/lit/tools/lldb-mi/symbol/symbol-list-lines.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c %p/inputs/symbol-list-lines.c %p/inputs/list-lines-helper.c --nodefaultlib -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/exec/exec-step.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-step.test
+++ lldb/lit/tools/lldb-mi/exec/exec-step.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c --nodefaultlib -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test
+++ lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c --nodefaultlib -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
+++ lldb/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %lldbmi < %s | FileCheck %s
 
 # Test that -exec-run command won't hang in case of wrong name of binary file.
Index: lldb/lit/tools/lldb-mi/exec/exec-next.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-next.test
+++ lldb/lit/tools/lldb-mi/exec/exec-next.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c --nodefaultlib -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/exec/exec-next-instruction.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-next-instruction.test
+++ lldb/lit/tools/lldb-mi/exec/exec-next-instruction.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c --nodefaultlib -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/exec/exec-interrupt.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-interrupt.test
+++ lldb/lit/tools/lldb-mi/exec/exec-interrupt.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c --nodefaultlib -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/exec/exec-finish.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-finish.test
+++ lldb/lit/tools/lldb-mi/exec/exec-finish.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/exec/exec-continue.test
===
--- lldb/lit/tools/lldb-mi/exec/exec-continue.test
+++ lldb/lit/tools/lldb-mi/exec/exec-continue.test
@@ -1,3 +1,4 @@
+# REQUIRES: lldb-mi
 # RUN: %build %p/inputs/main.c --nodefaultlib -o %t
 # RUN: %lldbmi %t < %s | FileCheck %s
 
Index: lldb/lit/tools/lldb-mi/data/data-info-line.test
===

[Lldb-commits] [PATCH] D58001: [lldb] [lit] Fix finding lld-link when it is not in 'compiler dir'

2019-02-09 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision.
mgorny added reviewers: zturner, labath.
mgorny added a project: LLDB.
Herald added a reviewer: serge-sans-paille.

Fix the build helper to find lld-link via PATH lookup, rather than
making a fragile assumption that it will be present in the 'compiler
directory'.  This fixes tests on Gentoo where clang and lld
are installed in different directories.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D58001

Files:
  lldb/lit/helper/build.py


Index: lldb/lit/helper/build.py
===
--- lldb/lit/helper/build.py
+++ lldb/lit/helper/build.py
@@ -283,17 +283,19 @@
 print('Using alternate compiler "{0}" to match selected 
target.'.format(self.compiler))
 
 if self.mode == 'link' or self.mode == 'compile-and-link':
-self.linker = self._find_linker('link') if toolchain_type == 
'msvc' else self._find_linker('lld-link')
+self.linker = self._find_linker('link') if toolchain_type == 
'msvc' else self._find_linker('lld-link', args.tools_dir)
 if not self.linker:
 raise ValueError('Unable to find an appropriate linker.')
 
 self.compile_env, self.link_env = self._get_visual_studio_environment()
 
-def _find_linker(self, name):
+def _find_linker(self, name, search_paths=[]):
 if sys.platform == 'win32':
 name = name + '.exe'
 compiler_dir = os.path.dirname(self.compiler)
 linker_path = os.path.join(compiler_dir, name)
+if not os.path.exists(linker_path):
+linker_path = find_executable(name, search_paths)
 if not os.path.exists(linker_path):
 raise ValueError('Could not find \'{}\''.format(linker_path))
 return linker_path


Index: lldb/lit/helper/build.py
===
--- lldb/lit/helper/build.py
+++ lldb/lit/helper/build.py
@@ -283,17 +283,19 @@
 print('Using alternate compiler "{0}" to match selected target.'.format(self.compiler))
 
 if self.mode == 'link' or self.mode == 'compile-and-link':
-self.linker = self._find_linker('link') if toolchain_type == 'msvc' else self._find_linker('lld-link')
+self.linker = self._find_linker('link') if toolchain_type == 'msvc' else self._find_linker('lld-link', args.tools_dir)
 if not self.linker:
 raise ValueError('Unable to find an appropriate linker.')
 
 self.compile_env, self.link_env = self._get_visual_studio_environment()
 
-def _find_linker(self, name):
+def _find_linker(self, name, search_paths=[]):
 if sys.platform == 'win32':
 name = name + '.exe'
 compiler_dir = os.path.dirname(self.compiler)
 linker_path = os.path.join(compiler_dir, name)
+if not os.path.exists(linker_path):
+linker_path = find_executable(name, search_paths)
 if not os.path.exists(linker_path):
 raise ValueError('Could not find \'{}\''.format(linker_path))
 return linker_path
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D57928: Fix x86 return pattern detection

2019-02-09 Thread Todd Mortimer via Phabricator via lldb-commits
mortimer updated this revision to Diff 186144.
mortimer added a comment.

Added a test to verify that the unwind state is reset after each kind of return.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57928/new/

https://reviews.llvm.org/D57928

Files:
  lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
  lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp

Index: lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
===
--- lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
+++ lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
@@ -2552,3 +2552,173 @@
 
 }
 
+TEST_F(Testx86AssemblyInspectionEngine, TestReturnDetect) {
+  std::unique_ptr engine = Getx86_64Inspector();
+
+  // Single fragment with all four return forms.
+  // We want to verify that the unwind state is reset after each ret.
+  uint8_t data[] = {
+  0x55, // offset  0 -- pushq %rbp
+  0x48, 0x89, 0xe5, // offset  1 -- movq %rsp, %rbp
+  0x31, 0xc0,   // offset  4 -- xorl %eax, %eax
+  0x5d, // offset  6 -- popq %rbp
+  0xc3, // offset  7 -- retq
+  0x31, 0xc0,   // offset  8 -- xorl %eax, %eax
+  0x5d, // offset 10 -- popq %rbp
+  0xcb, // offset 11 -- retf
+  0x31, 0xc0,   // offset 12 -- xorl %eax, %eax
+  0x5d, // offset 14 -- popq %rbp
+  0xc2, 0x22, 0x11, // offset 15 -- retq 0x1122
+  0x31, 0xc0,   // offset 18 -- xorl %eax, %eax
+  0x5d, // offset 20 -- popq %rbp
+  0xca, 0x44, 0x33, // offset 21 -- retf 0x3344
+  0x31, 0xc0,   // offset 24 -- xorl %eax, %eax
+  };
+
+  AddressRange sample_range(0x1000, sizeof(data));
+
+  UnwindPlan unwind_plan(eRegisterKindLLDB);
+  EXPECT_TRUE(engine->GetNonCallSiteUnwindPlanFromAssembly(
+  data, sizeof(data), sample_range, unwind_plan));
+
+  // Expect following unwind rows:
+  //  0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
+  //  1: CFA=rsp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  //  4: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  //  7: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
+  //  8: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  // 11: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
+  // 12: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  // 15: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
+  // 18: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  // 21: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
+  // 24: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+
+  EXPECT_TRUE(unwind_plan.GetInitialCFARegister() == k_rsp);
+  EXPECT_TRUE(unwind_plan.GetUnwindPlanValidAtAllInstructions() ==
+  eLazyBoolYes);
+  EXPECT_TRUE(unwind_plan.GetSourcedFromCompiler() == eLazyBoolNo);
+
+  UnwindPlan::Row::RegisterLocation regloc;
+
+  //  0: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
+  UnwindPlan::RowSP row_sp = unwind_plan.GetRowForFunctionOffset(0);
+  EXPECT_EQ(0ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  //  1: CFA=rsp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  row_sp = unwind_plan.GetRowForFunctionOffset(1);
+  EXPECT_EQ(1ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  //  4: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  row_sp = unwind_plan.GetRowForFunctionOffset(4);
+  EXPECT_EQ(4ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rbp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  //  7: CFA=rsp +8 => rsp=CFA+0 rip=[CFA-8]
+  row_sp = unwind_plan.GetRowForFunctionOffset(7);
+  EXPECT_EQ(7ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_TRUE(row_sp->GetCFAValue().IsRegisterPlusOffset() == true);
+  EXPECT_EQ(8, row_sp->GetCFAValue().GetOffset());
+
+  EXPECT_TRUE(row_sp->GetRegisterInfo(k_rip, regloc));
+  EXPECT_TRUE(regloc.IsAtCFAPlusOffset());
+  EXPECT_EQ(-8, regloc.GetOffset());
+
+  //  8: CFA=rbp+16 => rbp=[CFA-16] rsp=CFA+0 rip=[CFA-8]
+  row_sp = unwind_plan.GetRowForFunctionOffset(8);
+  EXPECT_EQ(8ull, row_sp->GetOffset());
+  EX