mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Rationalise debugger stuff in the tree. Within Xen itself, remove PDB references and fold into domu_debug. When domu_debug hits a breakpoint, it pauses all vcpus of the domain and raises VIRQ_DEBUGGER (not VIRQ_PDB). The debugger in domain0 can either poll pause status or bind to VIRQ_DEBUGGER. Before debugging a breakpointed domain the debugger should issue PAUSEDOMAIN itself, or it is not guaranteed to see paused state of the domain! Outside Xen there's a new dir tools/debugger, containing gdb, pdb and a new library libxendebug (used by pdb). I also think the ptrace functions in libxc also ought to be moved out: either to libxendebug or to a new library libxenptrace. Signed-off-by: Keir Fraser <keir@xensource.com>
40 lines
804 B
OCaml
40 lines
804 B
OCaml
(** Process.ml
|
|
*
|
|
* process context implementation
|
|
*
|
|
* @author copyright (c) 2005 alex ho
|
|
* @see <www.cl.cam.ac.uk/netos/pdb> pervasive debugger
|
|
* @version 1
|
|
*)
|
|
|
|
open Int32
|
|
open Intel
|
|
|
|
type context_t =
|
|
{
|
|
mutable domain : int;
|
|
mutable process : int;
|
|
}
|
|
|
|
let default_context = { domain = 0; process = 0 }
|
|
|
|
let new_context dom proc = { domain = dom; process = proc }
|
|
|
|
let string_of_context ctx =
|
|
Printf.sprintf "{process} domain: %d, process: %d"
|
|
ctx.domain ctx.process
|
|
|
|
let set_domain ctx value =
|
|
ctx.domain <- value;
|
|
print_endline (Printf.sprintf "ctx.domain <- %d" ctx.domain)
|
|
|
|
let set_process ctx value =
|
|
ctx.process <- value;
|
|
print_endline (Printf.sprintf "ctx.process <- %d" ctx.process)
|
|
|
|
let get_domain ctx =
|
|
ctx.domain
|
|
|
|
let get_process ctx =
|
|
ctx.process
|