1# Debug registers are currently printed only on FreeBSD.
2# REQUIRES: system-freebsd
3# REQUIRES: native && (target-x86 || target-x86_64) && dbregs-set
4# RUN: %clangxx_host -g %p/Inputs/x86-db-read.cpp -o %t
5# RUN: %lldb -b -s %s %t | FileCheck %s
6process launch
7# CHECK: Process {{[0-9]+}} stopped
8
9watchpoint set variable -w write g_8w
10# CHECK: Watchpoint created: Watchpoint 1: addr = 0x{{[0-9a-f]*}} size = 1 state = enabled type = w
11watchpoint set variable -w read_write g_16rw
12# CHECK: Watchpoint created: Watchpoint 2: addr = 0x{{[0-9a-f]*}} size = 2 state = enabled type = rw
13watchpoint set variable -w write g_32w
14# CHECK: Watchpoint created: Watchpoint 3: addr = 0x{{[0-9a-f]*}} size = 4 state = enabled type = w
15watchpoint set variable -w read_write g_32rw
16# CHECK: Watchpoint created: Watchpoint 4: addr = 0x{{[0-9a-f]*}} size = 4 state = enabled type = rw
17
18print &g_8w
19# CHECK: (uint8_t *) $0 = [[VAR8W:0x[0-9a-f]*]]
20print &g_16rw
21# CHECK: (uint16_t *) $1 = [[VAR16RW:0x[0-9a-f]*]]
22print &g_32w
23# CHECK: (uint32_t *) $2 = [[VAR32W:0x[0-9a-f]*]]
24print &g_32rw
25# CHECK: (uint32_t *) $3 = [[VAR64RW:0x[0-9a-f]*]]
26
27register read --all
28# CHECK-DAG: dr0 = [[VAR8W]]
29# CHECK-DAG: dr1 = [[VAR16RW]]
30# CHECK-DAG: dr2 = [[VAR32W]]
31# CHECK-DAG: dr3 = [[VAR64RW]]
32# CHECK-DAG: dr6 = 0x{{(00000000)?}}ffff0ff0
33# CHECK-DAG: dr7 = 0x{{(00000000)?}}fd7104aa
34
35process continue
36# CHECK: Process {{[0-9]+}} exited with status = 0
37