mirror of
https://github.com/golang/go
synced 2024-11-21 21:04:41 -07:00
libmach: more info when memory reads fail on Darwin
R=r CC=golang-dev https://golang.org/cl/604043
This commit is contained in:
parent
8021296179
commit
aceba042d6
@ -156,7 +156,7 @@ me(kern_return_t r)
|
||||
|
||||
for(i=0; i<nelem(macherr); i++){
|
||||
if(r == macherr[i].code){
|
||||
werrstr("%s", macherr[i].name);
|
||||
werrstr("mach: %s", macherr[i].name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -408,8 +408,10 @@ machsegrw(Map *map, Seg *seg, uvlong addr, void *v, uint n, int isr)
|
||||
if(isr){
|
||||
vm_size_t nn;
|
||||
nn = n;
|
||||
if(me(vm_read_overwrite(task, addr, n, (uintptr)v, &nn)) < 0)
|
||||
if(me(vm_read_overwrite(task, addr, n, (uintptr)v, &nn)) < 0) {
|
||||
fprint(2, "vm_read_overwrite %#llux %d to %p: %r\n", addr, n, v);
|
||||
return -1;
|
||||
}
|
||||
return nn;
|
||||
}else{
|
||||
r = vm_write(task, addr, (uintptr)v, n);
|
||||
|
Loading…
Reference in New Issue
Block a user