Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

lldb very slow single stepping rep stosb #42061

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR43091
Status NEW
Importance P enhancement
Reported by dingd (ntysdd@qq.com)
Reported on 2019-08-22 07:56:18 -0700
Last modified on 2019-08-22 18:31:37 -0700
Version unspecified
Hardware PC Linux
CC clayborg@gmail.com, jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments a.c (302 bytes, text/x-csrc)
Blocks
Blocked by
See also

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.

Quuxplusone 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?

Quuxplusone 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.

Quuxplusone commented 5 years ago

Attached a.c (302 bytes, text/x-csrc): the program to demonstrate the problem