aboutsummaryrefslogtreecommitdiff
path: root/src/libmach/Linux.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-06-11 12:52:08 +0000
committerrsc <devnull@localhost>2004-06-11 12:52:08 +0000
commit4f0073fec23f47ede29845f05ff5eab502be93f9 (patch)
tree9d09aaa1035a82d01cbd6a52666b9e49f3b2353f /src/libmach/Linux.c
parent9b24f92c5611353cdafb6756ae21b405ebc695dd (diff)
downloadplan9port-4f0073fec23f47ede29845f05ff5eab502be93f9.tar.gz
plan9port-4f0073fec23f47ede29845f05ff5eab502be93f9.tar.bz2
plan9port-4f0073fec23f47ede29845f05ff5eab502be93f9.zip
back to 32 bit for now
Diffstat (limited to 'src/libmach/Linux.c')
-rw-r--r--src/libmach/Linux.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/libmach/Linux.c b/src/libmach/Linux.c
index 7128bdc4..12b0f9b8 100644
--- a/src/libmach/Linux.c
+++ b/src/libmach/Linux.c
@@ -34,8 +34,8 @@ struct PtraceRegs
int pid;
};
-static int ptracerw(Map*, Seg*, uvlong, void*, uint, int);
-static int ptraceregrw(Regs*, char*, uvlong*, int);
+static int ptracerw(Map*, Seg*, ulong, void*, uint, int);
+static int ptraceregrw(Regs*, char*, ulong*, int);
static int attachedpids[1000];
static int nattached;
@@ -126,17 +126,12 @@ detachproc(int pid)
}
static int
-ptracerw(Map *map, Seg *seg, uvlong addr, void *v, uint n, int isr)
+ptracerw(Map *map, Seg *seg, ulong addr, void *v, uint n, int isr)
{
int i;
u32int u;
uchar buf[4];
- if(addr>>32){
- werrstr("address out of range");
- return -1;
- }
-
addr += seg->base;
for(i=0; i<n; i+=4){
if(isr){
@@ -205,7 +200,7 @@ reg2linux(char *reg)
}
static int
-ptraceregrw(Regs *regs, char *name, uvlong *val, int isr)
+ptraceregrw(Regs *regs, char *name, ulong *val, int isr)
{
int pid;
ulong addr;
@@ -215,7 +210,7 @@ ptraceregrw(Regs *regs, char *name, uvlong *val, int isr)
addr = reg2linux(name);
if(~addr == 0){
if(isr){
- *val = ~(uvlong)0;
+ *val = ~(ulong)0;
return 0;
}
werrstr("register not available");