FreeBSD Manual Pages
MACH(3) Library Functions Manual MACH(3) NAME machbytype, machbyname - machine-independent access to executables and programs SYNOPSIS #include <u.h> #include <libc.h> #include <mach.h> void machbytype(int type) int machbyname(char *name) extern Mach *mach; DESCRIPTION Libmach provides an interface for accessing the executable files and executing images of various architectures and operating systems. The interface is machine-independent, meaning that, for example, Mac OS X core dumps may be inspected using an x86 Linux machine and vice versa. In its current form, the library is mainly useful for writing debuggers of one sort or another. An architecture is described primarily by a Mach structure, which con- tains data structures and parameters describing the particular archi- tecture. Most library functions assume that the global variable mach points at the structure for the architecture being debugged. It is set implicitly by crackhdr (see and can be set explicitly by calling mach- byname or machbytype. There is no operating system-specific structure akin to mach. Typi- cally the choice of operating system on a particular architecture af- fects only the executable and core dump formats; the various file parsers deduce the operating system from information in the binary files themselves and adjust accordingly. The supported architectures are 386 (Intel 32-bit x86) 386 and later) and power (IBM PowerPC, typically running Mac OS X). Other manual pages describe the library functions in detail. describes some convenience routines for attaching to processes and core files. describes the manipulation of binary files. describes the interface to address spaces and register sets in exe- cutable files and executing programs. describes support for unwinding the stack. describes helper functions for accessing data in a particular byte or- der. describes the interface to debugging symbol information. SOURCE /src/libmach SEE ALSO MACH(3)
NAME | SYNOPSIS | DESCRIPTION | SOURCE | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mach&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>