Bug 211516

Summary: lldb: single stepping does not work on arm
Product: Base System Reporter: Ed Maste <emaste>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: thj
Priority: ---    
Version: CURRENT   
Hardware: arm   
OS: Any   
Bug Depends on:    
Bug Blocks: 231027    

Description Ed Maste freebsd_committer freebsd_triage 2016-08-01 22:16:43 UTC
Testing lldb in head on FreeBSD/arm shows that breakpoints work as expected, but single stepping does not.

root@:~ # lldb --version
lldb version 3.8.0 clang revision 262564

Example program:

root@:~ # cat hello.c
#include <stdio.h>

int
main(int argc, char *argv[])
{
        printf("Hello, world\n");
        printf("Another line\n");
        return 0;
}
root@:~ # cc -g hello.c
root@:~ #

Breakpoints work as expected:

root@:~ # lldb ./a.out
(lldb) target create "./a.out"
Current executable set to './a.out' (arm).
(lldb) b 6
Breakpoint 1: where = a.out`main + 36 at hello.c:6, address = 0x00008648
(lldb) run
Process 533 launching
Process 533 launched: '/root/a.out' (arm)
Process 533 stopped
* thread #1: tid = 100045, 0x00008648 a.out`main(argc=1, argv=0xbfbfed74) + 36 at hello.c:6, stop reason = breakpoint 1.1
    frame #0: 0x00008648 a.out`main(argc=1, argv=0xbfbfed74) + 36 at hello.c:6
   3    int
   4    main(int argc, char *argv[])
   5    {
-> 6            printf("Hello, world\n");
   7            printf("Another line\n");
   8            return 0;
   9    }

But stepping does not; the program just continues.

(lldb) step
(lldb) Hello, world
Another line
Process 533 exited with status = 0 (0x00000000) 

Instruction step (stepi) fails the same way.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2017-05-27 15:24:51 UTC
See LLVM r292937 https://reviews.llvm.org/rL292937
Comment 2 Ed Maste freebsd_committer freebsd_triage 2017-05-30 23:23:46 UTC
Single stepping reported working in LLDB built from SVN, post 4.0.1 https://lists.freebsd.org/pipermail/freebsd-arm/2017-May/016260.html. This will presumably be fixed when 5.0.0 is merged.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:53:05 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"