1 cfa37a7b 2004-04-10 devnull .TH MACH 3
3 bf8a59fa 2004-04-11 devnull machbytype, machbyname \- machine-independent access to executables and programs
4 cfa37a7b 2004-04-10 devnull .SH SYNOPSIS
5 cfa37a7b 2004-04-10 devnull .B #include <u.h>
7 cfa37a7b 2004-04-10 devnull .B #include <libc.h>
9 cfa37a7b 2004-04-10 devnull .B #include <mach.h>
13 cfa37a7b 2004-04-10 devnull void machbytype(int type)
16 cfa37a7b 2004-04-10 devnull int machbyname(char *name)
19 bf8a59fa 2004-04-11 devnull extern Mach *mach;
20 cfa37a7b 2004-04-10 devnull .SH DESCRIPTION
21 bf8a59fa 2004-04-11 devnull .I Libmach
22 bf8a59fa 2004-04-11 devnull provides an interface for accessing
23 bf8a59fa 2004-04-11 devnull the executable files and executing images of various architectures
24 bf8a59fa 2004-04-11 devnull and operating systems.
25 bf8a59fa 2004-04-11 devnull The interface is machine-independent, meaning that, for example,
26 bf8a59fa 2004-04-11 devnull Mac OS X core dumps may be inspected using an x86 Linux machine
27 bf8a59fa 2004-04-11 devnull and vice versa.
28 bf8a59fa 2004-04-11 devnull In its current form,
29 bf8a59fa 2004-04-11 devnull the library is mainly useful for writing debuggers
30 bf8a59fa 2004-04-11 devnull of one sort or another.
32 bf8a59fa 2004-04-11 devnull An architecture is described primarily by a
34 bf8a59fa 2004-04-11 devnull structure, which contains
35 bf8a59fa 2004-04-11 devnull data structures and parameters describing the
36 bf8a59fa 2004-04-11 devnull particular architecture.
37 bf8a59fa 2004-04-11 devnull Most library functions assume that the global variable
39 bf8a59fa 2004-04-11 devnull points at the structure for the architecture being debugged.
40 bf8a59fa 2004-04-11 devnull It is set implicitly by
41 bf8a59fa 2004-04-11 devnull .I crackhdr
43 bf8a59fa 2004-04-11 devnull .IR mach-file (3))
44 bf8a59fa 2004-04-11 devnull and can be set explicitly by calling
45 bf8a59fa 2004-04-11 devnull .I machbyname
47 bf8a59fa 2004-04-11 devnull .IR machbytype .
49 bf8a59fa 2004-04-11 devnull There is no operating system-specific structure akin to
50 bf8a59fa 2004-04-11 devnull .IR mach .
51 bf8a59fa 2004-04-11 devnull Typically the choice of operating system on a particular
52 bf8a59fa 2004-04-11 devnull architecture affects only the executable and core dump formats;
53 bf8a59fa 2004-04-11 devnull the various file parsers deduce the operating system from
54 bf8a59fa 2004-04-11 devnull information in the binary files themselves and adjust
55 bf8a59fa 2004-04-11 devnull accordingly.
57 bf8a59fa 2004-04-11 devnull Other manual pages
58 bf8a59fa 2004-04-11 devnull describe the library functions in detail.
60 bf8a59fa 2004-04-11 devnull .I Mach-file (3)
61 bf8a59fa 2004-04-11 devnull describes the manipulation of binary files.
63 bf8a59fa 2004-04-11 devnull .I Mach-map (3)
64 bf8a59fa 2004-04-11 devnull describes the interface to address spaces and register sets
65 bf8a59fa 2004-04-11 devnull in executable files and executing programs.
67 bf8a59fa 2004-04-11 devnull .I Mach-stack (3)
68 bf8a59fa 2004-04-11 devnull describes support for unwinding the stack.
70 bf8a59fa 2004-04-11 devnull .I Mach-swap (3)
71 bf8a59fa 2004-04-11 devnull describes helper functions for accessing data
72 bf8a59fa 2004-04-11 devnull in a particular byte order.
74 bf8a59fa 2004-04-11 devnull .I Mach-symbol (3)
75 bf8a59fa 2004-04-11 devnull describes the interface to debugging symbol information.
76 cfa37a7b 2004-04-10 devnull .SH SOURCE
77 b5fdffee 2004-04-19 devnull .B /usr/local/plan9/src/libmach
78 bf8a59fa 2004-04-11 devnull .SH "SEE ALSO
79 bf8a59fa 2004-04-11 devnull .IR mach-file (3),
80 bf8a59fa 2004-04-11 devnull .IR mach-map (3),
81 bf8a59fa 2004-04-11 devnull .IR mach-stack (3),
82 bf8a59fa 2004-04-11 devnull .IR mach-swap (3),
83 bf8a59fa 2004-04-11 devnull .IR mach-symbol (3)