fix <mach.h> types in manual (erik quanstros machmantype patch)

This commit is contained in:
cinap_lenrek 2013-04-25 00:13:19 +02:00
parent 667010554b
commit 35b5df0302
4 changed files with 38 additions and 32 deletions

View file

@ -15,36 +15,36 @@ leieeesftos, leieeedftos, ieeesftos, ieeedftos \- machine-independent debugger f
.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)

View file

@ -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 @@ int machbyname(char *name)
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 *loadmap(Map *map, int fd, Fhdr *fp)
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;

View file

@ -27,7 +27,7 @@ int isar(Biobuf *bp)
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.

View file

@ -29,16 +29,16 @@ int fileelem(Sym **fp, uchar *encname, char *buf, int n)
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 findlocal(Symbol *s1, char *name, Symbol *s2)
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 globalsym(Symbol *s, int index)
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.