blob: cb4df1d744c12b2d791de59cbda4388374a9c271 [file] [log] [blame]
# Starnix doesn't work with asan right now. LTO can cause execute_syscall to be inlined
# which breaks unwinding into user code.
## require is_asan=false
## require is_lto=false
## require is_thinlto=false
## require optimize=none
## set timeout 30
# TODO(https://fxbug.dev/42077983): attach shouldn't be necessary.
[zxdb] attach starnix_proc
Waiting for process matching "starnix_proc".
[zxdb] b starnix_proc.cc:9
Created Breakpoint 1 @ starnix_proc.cc:9
[zxdb] run-test --realm /core/testing/system-tests fuchsia-pkg://fuchsia.com/zxdb_e2e_inferiors#meta/starnix_proc.cm
Attached Process 1 state=Running koid=?? name=data/bin/starnix_proc components=starnix_kernel.cm,debian_container.cm
🛑 on bp 1 main() • starnix_proc.cc:9
[zxdb] next
🛑 main() • starnix_proc.cc:10
[zxdb] b sys_exit_group
Software breakpoints in starnix kernel are currently not supported. This breakpoint has been converted to a hardware breakpoint.
Hardware breakpoints can be specified on the command line:
break --type execute sys_exit_group
See `help break` for details and follow https://fxbug.dev/396421111 for updates on enabling software breakpoints in starnix_kernel.
Created Breakpoint 2 scope="pr 1" type=execute @ sys_exit_group
[zxdb] c
🛑 on bp 2
# Zxdb can unwind into restricted stack.
# TODO(https://fxbug.dev/395638033): Remove force-remote-unwind when the stripped binaries are
# shipped along with the debug info for the starnix container's (linux) prebuilt libc. This is only
# relevant here since there's a linux libc call on the stack in this test case that we cannot unwind
# through to get to the linux portion of the stack. The other starnix e2e tests don't need this
# because they don't have libc calls on the stack so unwinding using local debug info is enough.
[zxdb] frame --force-remote-unwind
# When optimization is on, there might be other inlined frame so we only check
# the existence of sys_exit_group and main function in the backtrace.
sys_exit_group
main() • starnix_proc.cc
[zxdb] bp rm
Removed Breakpoint 2 scope="pr 1" type=execute @ sys_exit_group
[zxdb] c
Process 1 exited with code 0.