aboutsummaryrefslogtreecommitdiff
path: root/microkernel/mach
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2016-03-18 10:51:44 +0100
committerThomas Schwinge <thomas@codesourcery.com>2016-03-18 10:51:44 +0100
commit74cea5526f697635a3b7a702c733c27a6258eb8e (patch)
tree19e1a6deda4d1f70c2dd8fc6ac96ad2070e55392 /microkernel/mach
parentf4ebd8729a7bd62cda48798cd19f47d2805c5f1d (diff)
parent895751fb07e382499b4afb8339a5bdd0ee9a2c2b (diff)
downloadweb-74cea5526f697635a3b7a702c733c27a6258eb8e.tar.gz
web-74cea5526f697635a3b7a702c733c27a6258eb8e.tar.bz2
web-74cea5526f697635a3b7a702c733c27a6258eb8e.zip
Merge commit '895751fb07e382499b4afb8339a5bdd0ee9a2c2b'
Diffstat (limited to 'microkernel/mach')
-rw-r--r--microkernel/mach/gnumach/debugging.mdwn12
-rw-r--r--microkernel/mach/gnumach/interface/thread_get_state.mdwn37
-rw-r--r--microkernel/mach/gnumach/interface/thread_set_state.mdwn11
3 files changed, 56 insertions, 4 deletions
diff --git a/microkernel/mach/gnumach/debugging.mdwn b/microkernel/mach/gnumach/debugging.mdwn
index c5c592b7..164c4349 100644
--- a/microkernel/mach/gnumach/debugging.mdwn
+++ b/microkernel/mach/gnumach/debugging.mdwn
@@ -1,5 +1,5 @@
-[[!meta copyright="Copyright © 2007, 2008, 2009, 2011, 2012, 2013, 2014 Free
-Software Foundation, Inc."]]
+[[!meta copyright="Copyright © 2007, 2008, 2009, 2011, 2012, 2013, 2014, 2016
+Free Software Foundation, Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
@@ -14,7 +14,7 @@ Here are some hints to debug with GNU Mach.
[[!toc levels=2]]
-# Kernel Debugger
+# Kernel Debugger (KDB)
Mach has a built-in kernel debugger.
[Manual](http://www.gnu.org/software/hurd/gnumach-doc/Kernel-Debugger.html).
@@ -45,11 +45,15 @@ Run the addr2line tool on the return addresses:
This will print the source code lines of the backtrace.
+To get the userland backtrace of the thread, you can use
+
+ trace/u
+
To examine the backtrace of some given thread, use
show all thread/u
-to get the whole listing of all tasks and threads. You can then use trace/t to trace a specific thread.
+to get the whole listing of all tasks and threads. You can then use trace/t or trace/tu to trace a specific thread.
Unfortunately, userland and kernelland use the same range of addresses, so one can not get userland traces easily. The Xen port uses different ranges, and in that case one can use trace/u to also get the userland trace.
diff --git a/microkernel/mach/gnumach/interface/thread_get_state.mdwn b/microkernel/mach/gnumach/interface/thread_get_state.mdwn
new file mode 100644
index 00000000..c44cb927
--- /dev/null
+++ b/microkernel/mach/gnumach/interface/thread_get_state.mdwn
@@ -0,0 +1,37 @@
+[[!meta copyright="Copyright © 2014 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta title="thread_get_state, thread_set_state"]]
+
+[[!tag open_issue_documentation]]
+
+
+# `i386_DEBUG_STATE`
+
+Access the x86 debug registers.
+
+[[!message-id "20110821231730.GF6004@type.famille.thibault.fr"]],
+[[!GNU_Savannah_Git_hurd_gnumach d14e4924c55e3016d1ddf7a38a7e93460ca10ac8]].
+
+For example, used by [[/GDB]] for implementing hardware watchpoints.
+
+
+## Open Issues
+
+[[!tag open_issue_gnumach]]
+
+ * Continuing on [[!message-id "87iokondoc.fsf@schwinge.name"]], do we need to
+ sanitize some of the values? Is user space allowed to set DR7's GD flag as
+ well as DR7's reserved flags, or should these flags be masked out?
+ Anything else?
+
+ * If [[KDB|debugging]] is using hardware watchpoints, those set by user space
+ applications will be ignored. This is because KDB and the user-space
+ application are competing for the x86 debug registers, and KDB wins.
diff --git a/microkernel/mach/gnumach/interface/thread_set_state.mdwn b/microkernel/mach/gnumach/interface/thread_set_state.mdwn
new file mode 100644
index 00000000..35b75e98
--- /dev/null
+++ b/microkernel/mach/gnumach/interface/thread_set_state.mdwn
@@ -0,0 +1,11 @@
+[[!meta copyright="Copyright © 2014 Free Software Foundation, Inc."]]
+
+[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
+id="license" text="Permission is granted to copy, distribute and/or modify this
+document under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no Invariant
+Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license
+is included in the section entitled [[GNU Free Documentation
+License|/fdl]]."]]"""]]
+
+[[!meta redir=thread_get_state]]