[all-commits] [llvm/llvm-project] 71c4da: Don't assume that stepping out of a function will ...

jimingham via All-commits all-commits at lists.llvm.org
Thu Mar 18 17:47:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71c4da83b67a485f0cfacbce8b46eaa497df900e
      https://github.com/llvm/llvm-project/commit/71c4da83b67a485f0cfacbce8b46eaa497df900e
  Author: Jim Ingham <jingham at apple.com>
  Date:   2021-03-18 (Thu, 18 Mar 2021)

  Changed paths:
    M lldb/test/API/functionalities/thread/step_out/TestThreadStepOut.py
    M lldb/test/API/functionalities/thread/step_out/main.cpp

  Log Message:
  -----------
  Don't assume that stepping out of a function will land on the next line.

For instance, some recent clang emits this code on x86_64:

    0x100002b99 <+57>: callq  0x100002b40               ; step_out_of_here at main.cpp:11
->  0x100002b9e <+62>: xorl   %eax, %eax
    0x100002ba0 <+64>: popq   %rbp
    0x100002ba1 <+65>: retq

and the "xorl %eax, %eax" is attributed to the same line as the callq.  Since
step out is supposed to stop just on returning from the function, you can't guarantee
it will end up on the next line.  I changed the test to check that we were either
on the call line or on the next line, since either would be right depending on the
debug information.




More information about the All-commits mailing list