[Lldb-commits] [PATCH] D32080: Introduce initial Debug Registers/NetBSD/amd64 support
Kamil Rytarowski via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 14 05:24:17 PDT 2017
krytarowski created this revision.
krytarowski added a project: LLDB.
This code offers Debug Registers (80386) model in LLDB/amd64.
This is initial support and has one issue that will be addressed later,
Debug Register trap (TRAP_DBREG) is registered as (TRAP_TRACE)
for unknown reason. On the other hand this state is good enough to
move on to add FPR/amd64 support.
Improve the NativeProcessNetBSD::ReinitializeThreads() function,
stop setting inside it SetStoppedByExec(). This fixes incorrect
stop reason on attaching (SetStoppedBySignal(SIGSTOP)).
This commits also has no functional style improvements from
clang-format.
Demo:
$ lldb ./watch
(lldb) target create "./watch"
Current executable set to './watch' (x86_64).
(lldb) c
error: invalid process
(lldb) r
Process 1573 launched: './watch' (x86_64)
Process 1573 stopped
* thread #1, stop reason = breakpoint 1.1
frame #0: 0x000000000040087f watch`main(argc=1, argv=0x00007f7fffa12b88) at watch.c:8
5 {
6 int i, j, k;
7
-> 8 for (i = 0; i < 3; i++)
9 for (j = 0; j < 3; j++)
10 for (k = 0; k < 3; k++)
11 printf("Hello world! i=%d j=%d k=%d\n", i, j, k);
(lldb) watch set var i
Watchpoint created: Watchpoint 1: addr = 0x7f7fffa12b4c size = 4 state = enabled type = w
declare @ '/public/lldb_devel/watch.c:6'
watchpoint spec = 'i'
new value: 0
(lldb) c
Process 1573 resuming
Hello world! i=0 j=0 k=0
Hello world! i=0 j=0 k=1
Hello world! i=0 j=0 k=2
Hello world! i=0 j=1 k=0
Hello world! i=0 j=1 k=1
Hello world! i=0 j=1 k=2
Hello world! i=0 j=2 k=0
Hello world! i=0 j=2 k=1
Hello world! i=0 j=2 k=2
Process 1573 stopped
* thread #1, stop reason = trace
frame #0: 0x00000000004008cc watch`main(argc=1, argv=0x00007f7fffa12b88) at watch.c:8
5 {
6 int i, j, k;
7
-> 8 for (i = 0; i < 3; i++)
9 for (j = 0; j < 3; j++)
10 for (k = 0; k < 3; k++)
11 printf("Hello world! i=%d j=%d k=%d\n", i, j, k)
Sponsored by <The NetBSD Foundation>
Repository:
rL LLVM
https://reviews.llvm.org/D32080
Files:
source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
source/Plugins/Process/Utility/RegisterInfos_x86_64.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32080.95288.patch
Type: text/x-patch
Size: 26647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170414/0cca3d23/attachment-0001.bin>
More information about the lldb-commits
mailing list