Bug 211516 - lldb: single stepping does not work on arm
Summary: lldb: single stepping does not work on arm
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks: 231027
  Show dependency treegraph
 
Reported: 2016-08-01 22:16 UTC by Ed Maste
Modified: 2018-09-05 12:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 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 2017-05-27 15:24:51 UTC
See LLVM r292937 https://reviews.llvm.org/rL292937
Comment 2 Ed Maste freebsd_committer 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"