ref: 35b5df03027056be551020c3b5b9a505cf74e952
parent: 667010554b30c46e35b9cad62edcfa01e37e1576
author: cinap_lenrek <[email protected]>
date: Wed Apr 24 20:13:19 EDT 2013
fix <mach.h> types in manual (erik quanstros machmantype patch)
--- a/sys/man/2/debugger
+++ b/sys/man/2/debugger
@@ -15,36 +15,36 @@
.ta \w'\fLmachines 'u
.nf
.B
-int cisctrace(Map *map, ulong pc, ulong sp, ulong link,
+int cisctrace(Map *map, uvlong pc, uvlong sp, uvlong link,
.B
Tracer trace)
.PP
.nf
.B
-int risctrace(Map *map, ulong pc, ulong sp, ulong link,
+int risctrace(Map *map, uvlong pc, uvlong sp, uvlong link,
.B
Tracer trace)
.PP
.nf
.B
-ulong ciscframe(Map *map, ulong addr, ulong pc, ulong sp,
+uvlong ciscframe(Map *map, uvlong addr, uvlong pc, uvlong sp,
.B
- ulong link)
+ uvlong link)
.PP
.nf
.B
-ulong riscframe(Map *map, ulong addr, ulong pc, ulong sp,
+uvlong riscframe(Map *map, uvlong addr, uvlong pc, uvlong sp,
.B
- ulong link)
+ uvlong link)
.PP
.nf
.B
-int localaddr(Map *map, char *fn, char *var, long *ret,
+int localaddr(Map *map, char *fn, char *var, uvlong *ret,
.B
Rgetter rget)
.PP
.B
-int symoff(char *buf, int n, long addr, int type)
+int symoff(char *buf, int n, uvlong addr, int type)
.PP
.B
int fpformat(Map *map, Reglist *rp, char *buf, int n, int code)
--- a/sys/man/2/mach
+++ b/sys/man/2/mach
@@ -1,7 +1,7 @@
.TH MACH 2
.SH NAME
crackhdr, machbytype, machbyname, newmap, setmap, findseg, unusemap,
-loadmap, attachproc, get1, get2, get4, get8, put1, put2, put4, put8,
+loadmap, attachproc, get1, get2, get4, get8, geta, put1, put2, put4, put8, puta
beswab, beswal, beswav, leswab, leswal, leswav \- machine-independent access to executable files
.SH SYNOPSIS
.B #include <u.h>
@@ -26,10 +26,10 @@
Map *newmap(Map *map, int n)
.PP
.B
-int setmap(Map *map, int fd, ulong base, ulong end,
+int setmap(Map *map, int fd, uvlong base, uvlong end,
.PP
.B
- ulong foffset, char *name)
+ vlong foffset, char *name)
.PP
.B
int findseg(Map *map, char *name)
@@ -44,46 +44,52 @@
Map *attachproc(int pid, int kflag, int corefd, Fhdr *fp)
.PP
.B
-int get1(Map *map, ulong addr, uchar *buf, int n)
+int get1(Map *map, uvlong addr, uchar *buf, int n)
.PP
.B
-int get2(Map *map, ulong addr, ushort *val)
+int get2(Map *map, uvlong addr, ushort *val)
.PP
.B
-int get4(Map *map, ulong addr, long *val)
+int get4(Map *map, uvlong addr, ulong *val)
.PP
.B
-int get8(Map *map, ulong addr, vlong *val)
+int get8(Map *map, uvlong addr, uvlong *val)
.PP
.B
-int put1(Map *map, ulong addr, uchar *buf, int n)
+int geta(Map *map, uvlong addr, uvlong *val)
.PP
.B
-int put2(Map *map, ulong addr, ushort val)
+int put1(Map *map, uvlong addr, uchar *buf, int n)
.PP
.B
-int put4(Map *map, ulong addr, long val)
+int put2(Map *map, uvlong addr, ushort val)
.PP
.B
-int put8(Map *map, ulong addr, vlong val)
+int put4(Map *map, uvlong addr, ulong val)
.PP
.B
+int put8(Map *map, uvlong addr, uvlong val)
+.PP
+.B
+int puta(Map *map, uvlong addr, uvlong val)
+.PP
+.B
ushort beswab(ushort val)
.PP
.B
-long beswal(long val)
+long beswal(ulong val)
.PP
.B
-long beswav(vlong val)
+long beswav(uvlong val)
.PP
.B
ushort leswab(ushort val)
.PP
.B
-long leswal(long val)
+long leswal(ulong val)
.PP
.B
-long leswav(vlong val)
+long leswav(uvlong val)
.PP
.B
extern Mach mach;
--- a/sys/man/2/object
+++ b/sys/man/2/object
@@ -27,7 +27,7 @@
int nextar(Biobuf *bp, int offset, char *buf)
.PP
.B
-int readar(Biobuf *bp, int objtype, int end)
+int readar(Biobuf *bp, int objtype, vlong end, int doautos)
.SH DESCRIPTION
These functions provide machine-independent access to object files
in a directory or an archive.
--- a/sys/man/2/symbol
+++ b/sys/man/2/symbol
@@ -29,16 +29,16 @@
int filesym(int index, char *buf, int n)
.PP
.B
-long pc2sp(ulong pc)
+long pc2sp(uvlong pc)
.PP
.B
-long pc2line(ulong pc)
+long pc2line(uvlong pc)
.PP
.B
-void textseg(ulong base, Fhdr *fp)
+void textseg(uvlong base, Fhdr *fp)
.PP
.B
-long line2addr(ulong line, ulong basepc)
+uvlong line2addr(ulong line, uvlong basepc, uvlong endpc)
.PP
.B
int lookup(char *fn, char *var, Symbol *s)
@@ -50,7 +50,7 @@
int getauto(Symbol *s1, int off, int class, Symbol *s2)
.PP
.B
-int findsym(long addr, int class, Symbol *s)
+int findsym(uvlong addr, int class, Symbol *s)
.PP
.B
int localsym(Symbol *s, int index)
@@ -62,13 +62,13 @@
int textsym(Symbol *s, int index)
.PP
.B
-long file2pc(char *file, ulong line)
+uvlong file2pc(char *file, ulong line)
.PP
.B
-int fileline(char *str, int n, ulong addr)
+int fileline(char *str, int n, uvlong addr)
.PP
.B
-int fnbound(long addr, ulong *bounds)
+int fnbound(uvlong addr, uvlong *bounds)
.SH DESCRIPTION
These functions provide machine-independent access to the
symbol table of an executable file or executing process.