llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.92k stars 11.52k forks source link

lldb very slow single stepping rep stosb #42436

Open llvmbot opened 5 years ago

llvmbot commented 5 years ago
Bugzilla Link 43091
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @JDevlieghere

Extended Description

When single stepping the asm instructions, I find lldb very slow when encountering a (large) rep stosb.

The debugger essentially hung.

While I can use Ctrl-C to break the program into debugger, I still can't continue debugging, because even I put a breakpoint on the next instruction, and use the "c" command, it is still very slow.

However, if I don't try to single step the rep instruction, and directly put a breakpoint on the next instruction and use "c", it's way faster.

llvmbot commented 5 years ago

the program to demonstrate the problem

llvmbot commented 5 years ago

I'm using manjaro linux x64. Using command line interface to single stepping a program (using the "si" or "ni" command). "rep stosb" is Intel x86/x64 asm.

llvmbot commented 5 years ago

More info would be helpful. What architecture is this? How are you debugging it? What is a "rep stosb"? Do you have a binary that reproduces this or a code snippet that we can use to see this in real life?