GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MACH(3) FreeBSD Library Functions Manual MACH(3)

machbytype, machbyname - machine-independent access to executables and programs

#include <u.h>
#include <libc.h>
#include <mach.h>

void machbytype(int type)

int machbyname(char *name)

extern Mach *mach;

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 contains data structures and parameters describing the particular architecture. 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 machbyname or machbytype.

There is no operating system-specific structure akin to mach. Typically the choice of operating system on a particular architecture affects 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 executable files and executing programs.

describes support for unwinding the stack.

describes helper functions for accessing data in a particular byte order.

describes the interface to debugging symbol information.

/src/libmach


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.