aboutsummaryrefslogtreecommitdiffstats
path: root/tools/debugger
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-12 11:07:37 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-10-12 11:07:37 +0100
commitd8263e8dbaf5ef1445bee0662143a0fcb6d43466 (patch)
tree9f12854f6cced9647fda399d756f23a47fcc6c97 /tools/debugger
parente2c103e4851e41622adfe762ab34f7518f8c371e (diff)
downloadxen-d8263e8dbaf5ef1445bee0662143a0fcb6d43466.tar.gz
xen-d8263e8dbaf5ef1445bee0662143a0fcb6d43466.tar.bz2
xen-d8263e8dbaf5ef1445bee0662143a0fcb6d43466.zip
Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends). Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/debugger')
-rw-r--r--tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c2
-rw-r--r--tools/debugger/libxendebug/xendebug.c80
-rw-r--r--tools/debugger/libxendebug/xendebug.h56
-rw-r--r--tools/debugger/pdb/linux-2.6-module/debug.c20
-rw-r--r--tools/debugger/pdb/linux-2.6-module/pdb_debug.h4
-rw-r--r--tools/debugger/pdb/linux-2.6-module/pdb_module.h50
-rw-r--r--tools/debugger/pdb/pdb_caml_domain.c4
-rw-r--r--tools/debugger/pdb/pdb_caml_evtchn.c4
-rw-r--r--tools/debugger/pdb/pdb_caml_process.c2
-rw-r--r--tools/debugger/pdb/pdb_caml_xc.c2
-rw-r--r--tools/debugger/pdb/pdb_caml_xcs.c4
11 files changed, 114 insertions, 114 deletions
diff --git a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c
index 8d7ff017bf..dcc56cb3d5 100644
--- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c
+++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c
@@ -38,7 +38,7 @@
#include <xenctrl.h>
#define TRACE_ENTER /* printf("enter %s\n", __FUNCTION__) */
-long (*myptrace)(int xc_handle, enum __ptrace_request, u32, long, long);
+long (*myptrace)(int xc_handle, enum __ptrace_request, uint32_t, long, long);
int (*myxcwait)(int xc_handle, int domain, int *status, int options) ;
static int xc_handle;
diff --git a/tools/debugger/libxendebug/xendebug.c b/tools/debugger/libxendebug/xendebug.c
index f0d8be326f..cb939a7424 100644
--- a/tools/debugger/libxendebug/xendebug.c
+++ b/tools/debugger/libxendebug/xendebug.c
@@ -41,8 +41,8 @@ typedef struct bwcpoint /* break/watch/catch point */
{
struct list_head list;
unsigned long address;
- u32 domain;
- u8 old_value; /* old value for software bkpt */
+ uint32_t domain;
+ uint8_t old_value; /* old value for software bkpt */
} bwcpoint_t, *bwcpoint_p;
static bwcpoint_t bwcpoint_list;
@@ -52,7 +52,7 @@ static bwcpoint_t bwcpoint_list;
typedef struct domain_context /* local cache of domain state */
{
struct list_head list;
- u32 domid;
+ uint32_t domid;
boolean valid[MAX_VIRT_CPUS];
vcpu_guest_context_t context[MAX_VIRT_CPUS];
@@ -92,7 +92,7 @@ xendebug_initialize()
/**************/
static domain_context_p
-xendebug_domain_context_search (u32 domid)
+xendebug_domain_context_search (uint32_t domid)
{
struct list_head *entry;
domain_context_p ctxt;
@@ -107,7 +107,7 @@ xendebug_domain_context_search (u32 domid)
}
static __inline__ domain_context_p
-xendebug_get_context (int xc_handle, u32 domid, u32 vcpu)
+xendebug_get_context (int xc_handle, uint32_t domid, uint32_t vcpu)
{
int rc;
domain_context_p ctxt;
@@ -130,7 +130,7 @@ xendebug_get_context (int xc_handle, u32 domid, u32 vcpu)
}
static __inline__ int
-xendebug_set_context (int xc_handle, domain_context_p ctxt, u32 vcpu)
+xendebug_set_context (int xc_handle, domain_context_p ctxt, uint32_t vcpu)
{
dom0_op_t op;
int rc;
@@ -157,8 +157,8 @@ xendebug_set_context (int xc_handle, domain_context_p ctxt, u32 vcpu)
int
xendebug_attach(int xc_handle,
- u32 domid,
- u32 vcpu)
+ uint32_t domid,
+ uint32_t vcpu)
{
domain_context_p ctxt;
@@ -176,8 +176,8 @@ xendebug_attach(int xc_handle,
int
xendebug_detach(int xc_handle,
- u32 domid,
- u32 vcpu)
+ uint32_t domid,
+ uint32_t vcpu)
{
domain_context_p ctxt;
@@ -197,8 +197,8 @@ xendebug_detach(int xc_handle,
int
xendebug_read_registers(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
cpu_user_regs_t **regs)
{
domain_context_p ctxt;
@@ -218,8 +218,8 @@ xendebug_read_registers(int xc_handle,
int
xendebug_read_fpregisters (int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
char **regs)
{
domain_context_p ctxt;
@@ -239,8 +239,8 @@ xendebug_read_fpregisters (int xc_handle,
int
xendebug_write_registers(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
cpu_user_regs_t *regs)
{
domain_context_p ctxt;
@@ -260,8 +260,8 @@ xendebug_write_registers(int xc_handle,
int
xendebug_step(int xc_handle,
- u32 domid,
- u32 vcpu)
+ uint32_t domid,
+ uint32_t vcpu)
{
domain_context_p ctxt;
int rc;
@@ -282,8 +282,8 @@ xendebug_step(int xc_handle,
int
xendebug_continue(int xc_handle,
- u32 domid,
- u32 vcpu)
+ uint32_t domid,
+ uint32_t vcpu)
{
domain_context_p ctxt;
int rc;
@@ -310,8 +310,8 @@ xendebug_continue(int xc_handle,
/* access to one page */
static int
-xendebug_memory_page (domain_context_p ctxt, int xc_handle, u32 vcpu,
- int protection, unsigned long address, int length, u8 *buffer)
+xendebug_memory_page (domain_context_p ctxt, int xc_handle, uint32_t vcpu,
+ int protection, unsigned long address, int length, uint8_t *buffer)
{
vcpu_guest_context_t *vcpu_ctxt = &ctxt->context[vcpu];
unsigned long pde, page;
@@ -406,8 +406,8 @@ xendebug_memory_page (domain_context_p ctxt, int xc_handle, u32 vcpu,
/* divide a memory operation into accesses to individual pages */
static int
-xendebug_memory_op (domain_context_p ctxt, int xc_handle, u32 vcpu,
- int protection, unsigned long address, int length, u8 *buffer)
+xendebug_memory_op (domain_context_p ctxt, int xc_handle, uint32_t vcpu,
+ int protection, unsigned long address, int length, uint8_t *buffer)
{
int remain; /* number of bytes to touch past this page */
int bytes = 0;
@@ -429,11 +429,11 @@ xendebug_memory_op (domain_context_p ctxt, int xc_handle, u32 vcpu,
int
xendebug_read_memory(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length,
- u8 *data)
+ uint32_t length,
+ uint8_t *data)
{
domain_context_p ctxt;
@@ -449,11 +449,11 @@ xendebug_read_memory(int xc_handle,
int
xendebug_write_memory(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length,
- u8 *data)
+ uint32_t length,
+ uint8_t *data)
{
domain_context_p ctxt;
@@ -469,13 +469,13 @@ xendebug_write_memory(int xc_handle,
int
xendebug_insert_memory_breakpoint(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length)
+ uint32_t length)
{
bwcpoint_p bkpt;
- u8 breakpoint_opcode = 0xcc;
+ uint8_t breakpoint_opcode = 0xcc;
printf("insert breakpoint %d:%lx %d\n",
domid, address, length);
@@ -515,10 +515,10 @@ xendebug_insert_memory_breakpoint(int xc_handle,
int
xendebug_remove_memory_breakpoint(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length)
+ uint32_t length)
{
bwcpoint_p bkpt = NULL;
@@ -552,7 +552,7 @@ int
xendebug_query_domain_stop(int xc_handle, int *dom_list, int dom_list_size)
{
xc_dominfo_t *info;
- u32 first_dom = 0;
+ uint32_t first_dom = 0;
int max_doms = 1024;
int nr_doms, loop;
int count = 0;
diff --git a/tools/debugger/libxendebug/xendebug.h b/tools/debugger/libxendebug/xendebug.h
index 41be10df5f..dfd2c3e2d3 100644
--- a/tools/debugger/libxendebug/xendebug.h
+++ b/tools/debugger/libxendebug/xendebug.h
@@ -12,63 +12,63 @@
#include <xenctrl.h>
int xendebug_attach(int xc_handle,
- u32 domid,
- u32 vcpu);
+ uint32_t domid,
+ uint32_t vcpu);
int xendebug_detach(int xc_handle,
- u32 domid,
- u32 vcpu);
+ uint32_t domid,
+ uint32_t vcpu);
int xendebug_read_registers(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
cpu_user_regs_t **regs);
int xendebug_read_fpregisters (int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
char **regs);
int xendebug_write_registers(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
cpu_user_regs_t *regs);
int xendebug_step(int xc_handle,
- u32 domid,
- u32 vcpu);
+ uint32_t domid,
+ uint32_t vcpu);
int xendebug_continue(int xc_handle,
- u32 domid,
- u32 vcpu);
+ uint32_t domid,
+ uint32_t vcpu);
int xendebug_read_memory(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length,
- u8 *data);
+ uint32_t length,
+ uint8_t *data);
int xendebug_write_memory(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length,
- u8 *data);
+ uint32_t length,
+ uint8_t *data);
int xendebug_insert_memory_breakpoint(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length);
+ uint32_t length);
int xendebug_remove_memory_breakpoint(int xc_handle,
- u32 domid,
- u32 vcpu,
+ uint32_t domid,
+ uint32_t vcpu,
unsigned long address,
- u32 length);
+ uint32_t length);
int xendebug_query_domain_stop(int xc_handle,
int *dom_list,
diff --git a/tools/debugger/pdb/linux-2.6-module/debug.c b/tools/debugger/pdb/linux-2.6-module/debug.c
index 00955313f5..03d306ddde 100644
--- a/tools/debugger/pdb/linux-2.6-module/debug.c
+++ b/tools/debugger/pdb/linux-2.6-module/debug.c
@@ -29,13 +29,13 @@ typedef struct bwcpoint /* break/watch/catch point */
unsigned long address;
int length;
- u8 type; /* BWC_??? */
- u8 mode; /* for BWC_PAGE, the current protection mode */
- u32 process;
- u8 error; /* error occured when enabling: don't disable. */
+ uint8_t type; /* BWC_??? */
+ uint8_t mode; /* for BWC_PAGE, the current protection mode */
+ uint32_t process;
+ uint8_t error; /* error occured when enabling: don't disable. */
/* original values */
- u8 orig_bkpt; /* single byte breakpoint */
+ uint8_t orig_bkpt; /* single byte breakpoint */
pte_t orig_pte;
struct list_head watchpt_read_list; /* read watchpoints on this page */
@@ -109,7 +109,7 @@ pdb_bwc_print_list (void)
}
bwcpoint_p
-pdb_search_watchpoint (u32 process, unsigned long address)
+pdb_search_watchpoint (uint32_t process, unsigned long address)
{
bwcpoint_p bwc_watch = (bwcpoint_p) 0;
bwcpoint_p bwc_entry = (bwcpoint_p) 0;
@@ -150,7 +150,7 @@ pdb_search_watchpoint (u32 process, unsigned long address)
int
pdb_suspend (struct task_struct *target)
{
- u32 rc = 0;
+ uint32_t rc = 0;
force_sig(SIGSTOP, target); /* force_sig_specific ??? */
@@ -364,11 +364,11 @@ pdb_step (struct task_struct *target)
int
pdb_insert_memory_breakpoint (struct task_struct *target,
- unsigned long address, u32 length)
+ unsigned long address, uint32_t length)
{
int rc = 0;
bwcpoint_p bkpt;
- u8 breakpoint_opcode = 0xcc;
+ uint8_t breakpoint_opcode = 0xcc;
printk("insert breakpoint %d:%lx len: %d\n", target->pid, address, length);
@@ -399,7 +399,7 @@ pdb_insert_memory_breakpoint (struct task_struct *target,
int
pdb_remove_memory_breakpoint (struct task_struct *target,
- unsigned long address, u32 length)
+ unsigned long address, uint32_t length)
{
int rc = 0;
bwcpoint_p bkpt = NULL;
diff --git a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h
index 7993464c31..89adbc0b0d 100644
--- a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h
+++ b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h
@@ -18,9 +18,9 @@ int pdb_continue (struct task_struct *target);
int pdb_step (struct task_struct *target);
int pdb_insert_memory_breakpoint (struct task_struct *target,
- unsigned long address, u32 length);
+ unsigned long address, uint32_t length);
int pdb_remove_memory_breakpoint (struct task_struct *target,
- unsigned long address, u32 length);
+ unsigned long address, uint32_t length);
int pdb_insert_watchpoint (struct task_struct *target,
pdb_op_watchpt_p watchpt);
int pdb_remove_watchpoint (struct task_struct *target,
diff --git a/tools/debugger/pdb/linux-2.6-module/pdb_module.h b/tools/debugger/pdb/linux-2.6-module/pdb_module.h
index a7e679ecdf..472403d69e 100644
--- a/tools/debugger/pdb/linux-2.6-module/pdb_module.h
+++ b/tools/debugger/pdb/linux-2.6-module/pdb_module.h
@@ -9,7 +9,7 @@
#define PDB_OPCODE_ATTACH 2
typedef struct pdb_op_attach
{
- u32 domain;
+ uint32_t domain;
} pdb_op_attach_t, *pdb_op_attach_p;
#define PDB_OPCODE_DETACH 3
@@ -17,43 +17,43 @@ typedef struct pdb_op_attach
#define PDB_OPCODE_RD_REG 4
typedef struct pdb_op_rd_reg
{
- u32 reg;
- u32 value;
+ uint32_t reg;
+ uint32_t value;
} pdb_op_rd_reg_t, *pdb_op_rd_reg_p;
#define PDB_OPCODE_RD_REGS 5
typedef struct pdb_op_rd_regs
{
- u32 reg[GDB_REGISTER_FRAME_SIZE];
+ uint32_t reg[GDB_REGISTER_FRAME_SIZE];
} pdb_op_rd_regs_t, *pdb_op_rd_regs_p;
#define PDB_OPCODE_WR_REG 6
typedef struct pdb_op_wr_reg
{
- u32 reg;
- u32 value;
+ uint32_t reg;
+ uint32_t value;
} pdb_op_wr_reg_t, *pdb_op_wr_reg_p;
#define PDB_OPCODE_RD_MEM 7
typedef struct pdb_op_rd_mem_req
{
- u32 address;
- u32 length;
+ uint32_t address;
+ uint32_t length;
} pdb_op_rd_mem_req_t, *pdb_op_rd_mem_req_p;
typedef struct pdb_op_rd_mem_resp
{
- u32 address;
- u32 length;
- u8 data[1024];
+ uint32_t address;
+ uint32_t length;
+ uint8_t data[1024];
} pdb_op_rd_mem_resp_t, *pdb_op_rd_mem_resp_p;
#define PDB_OPCODE_WR_MEM 8
typedef struct pdb_op_wr_mem
{
- u32 address;
- u32 length;
- u8 data[1024]; /* arbitrary */
+ uint32_t address;
+ uint32_t length;
+ uint8_t data[1024]; /* arbitrary */
} pdb_op_wr_mem_t, *pdb_op_wr_mem_p;
#define PDB_OPCODE_CONTINUE 9
@@ -63,8 +63,8 @@ typedef struct pdb_op_wr_mem
#define PDB_OPCODE_CLR_BKPT 12
typedef struct pdb_op_bkpt
{
- u32 address;
- u32 length;
+ uint32_t address;
+ uint32_t length;
} pdb_op_bkpt_t, *pdb_op_bkpt_p;
#define PDB_OPCODE_SET_WATCHPT 13
@@ -79,16 +79,16 @@ typedef struct pdb_op_watchpt
#define BWC_WATCH_WRITE 102
#define BWC_WATCH_READ 103
#define BWC_WATCH_ACCESS 104
- u32 type;
- u32 address;
- u32 length;
+ uint32_t type;
+ uint32_t address;
+ uint32_t length;
} pdb_op_watchpt_t, *pdb_op_watchpt_p;
typedef struct
{
- u8 operation; /* PDB_OPCODE_??? */
- u32 process;
+ uint8_t operation; /* PDB_OPCODE_??? */
+ uint32_t process;
union
{
pdb_op_attach_t attach;
@@ -107,10 +107,10 @@ typedef struct
#define PDB_RESPONSE_ERROR -1
typedef struct {
- u8 operation; /* copied from request */
- u32 domain;
- u32 process;
- s16 status; /* PDB_RESPONSE_??? */
+ uint8_t operation; /* copied from request */
+ uint32_t domain;
+ uint32_t process;
+ int16_t status; /* PDB_RESPONSE_??? */
union
{
pdb_op_rd_reg_t rd_reg;
diff --git a/tools/debugger/pdb/pdb_caml_domain.c b/tools/debugger/pdb/pdb_caml_domain.c
index 482f7df5fa..15058ffb45 100644
--- a/tools/debugger/pdb/pdb_caml_domain.c
+++ b/tools/debugger/pdb/pdb_caml_domain.c
@@ -204,7 +204,7 @@ dom_read_memory (value context, value address, value length)
int loop;
char *buffer;
unsigned long my_address = Int32_val(address);
- u32 my_length = Int_val(length);
+ uint32_t my_length = Int_val(length);
printf ("(pdb) read memory\n");
@@ -260,7 +260,7 @@ dom_write_memory (value context, value address, value val_list)
char buffer[4096]; /* a big buffer */
unsigned long my_address;
- u32 length = 0;
+ uint32_t length = 0;
printf ("(pdb) write memory\n");
diff --git a/tools/debugger/pdb/pdb_caml_evtchn.c b/tools/debugger/pdb/pdb_caml_evtchn.c
index 0a3e0ae823..8107814156 100644
--- a/tools/debugger/pdb/pdb_caml_evtchn.c
+++ b/tools/debugger/pdb/pdb_caml_evtchn.c
@@ -125,7 +125,7 @@ evtchn_read (value fd)
{
CAMLparam1(fd);
- u16 v;
+ uint16_t v;
int bytes;
int rc = -1;
int myfd = Int_val(fd);
@@ -168,7 +168,7 @@ evtchn_unmask (value fd, value idx)
CAMLparam1(fd);
int myfd = Int_val(fd);
- u16 myidx = Int_val(idx);
+ uint16_t myidx = Int_val(idx);
(void)write(myfd, &myidx, sizeof(myidx));
diff --git a/tools/debugger/pdb/pdb_caml_process.c b/tools/debugger/pdb/pdb_caml_process.c
index c91a01147a..f332e1653e 100644
--- a/tools/debugger/pdb/pdb_caml_process.c
+++ b/tools/debugger/pdb/pdb_caml_process.c
@@ -404,7 +404,7 @@ proc_write_memory (value context, value address, value val_list)
context_t ctx;
pdb_request_t req;
- u32 length = 0;
+ uint32_t length = 0;
decode_context(&ctx, context);
diff --git a/tools/debugger/pdb/pdb_caml_xc.c b/tools/debugger/pdb/pdb_caml_xc.c
index 1bd1fdfb01..6a1fe8e492 100644
--- a/tools/debugger/pdb/pdb_caml_xc.c
+++ b/tools/debugger/pdb/pdb_caml_xc.c
@@ -151,7 +151,7 @@ evtchn_bind_interdomain (value remote_domain)
}
void *
-map_ring(u32 dom, unsigned long mfn )
+map_ring(uint32_t dom, unsigned long mfn )
{
return xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
PROT_READ | PROT_WRITE, mfn);
diff --git a/tools/debugger/pdb/pdb_caml_xcs.c b/tools/debugger/pdb/pdb_caml_xcs.c
index cdf4ddb4b5..974cf83925 100644
--- a/tools/debugger/pdb/pdb_caml_xcs.c
+++ b/tools/debugger/pdb/pdb_caml_xcs.c
@@ -36,7 +36,7 @@ static int control_fd = -1;
#include "pdb_module.h"
#include "pdb_caml_xen.h"
-void *map_ring(u32 dom, unsigned long mfn );
+void *map_ring(uint32_t dom, unsigned long mfn );
/*
* xcs_initialize_ring : int -> int32 -> int32
@@ -180,7 +180,7 @@ xcs_connect (value path, value msg_type)
char *my_path = String_val(path);
int my_msg_type = Int_val(msg_type);
struct sockaddr_un addr;
- u32 session_id = 0;
+ uint32_t session_id = 0;
int data_fd;
int ret, len;
xcs_msg_t msg;