head	1.2;
access;
symbols
	RELENG_3_5_0_RELEASE:1.1.1.1.4.1
	RELENG_3_4_0_RELEASE:1.1.1.1.4.1
	RELENG_3_3_0_RELEASE:1.1.1.1.4.1
	RELENG_3_2_0_RELEASE:1.1.1.1.4.1
	RELENG_3_1_0_RELEASE:1.1.1.1
	RELENG_3:1.1.1.1.0.4
	RELENG_3_BP:1.1.1.1
	RELENG_2_2_8_RELEASE:1.1.1.1
	RELENG_3_0_0_RELEASE:1.1.1.1
	RELENG_2_2_7_RELEASE:1.1.1.1
	RELENG_2_2_6_RELEASE:1.1.1.1
	RELENG_2_2_5_RELEASE:1.1.1.1
	RELENG_2_2_2_RELEASE:1.1.1.1
	RELENG_2_2_1_RELEASE:1.1.1.1
	RELENG_2_2_0_RELEASE:1.1.1.1
	RELENG_2_2:1.1.1.1.0.2
	v4_16:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.2
date	99.05.02.15.24.09;	author dfr;	state dead;
branches;
next	1.1;

1.1
date	96.11.03.17.02.28;	author pst;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.11.03.17.02.28;	author pst;	state Exp;
branches
	1.1.1.1.4.1;
next	1.1.1.2;

1.1.1.2
date	2004.06.19.15.43.42;	author marcel;	state dead;
branches;
next	;

1.1.1.1.4.1
date	99.05.08.08.49.49;	author dfr;	state dead;
branches;
next	;


desc
@@


1.2
log
@Delete parts of gdb which are now shared with binutils.
@
text
@	Preliminary Notes on Porting BFD
	--------------------------------

The 'host' is the system a tool runs *on*.
The 'target' is the system a tool runs *for*, i.e.
a tool can read/write the binaries of the target.

Porting to a new host
---------------------
Pick a name for your host. Call that <host>.
(<host> might be sun4, ...)
Create a file hosts/<host>.mh.

Porting to a new target
-----------------------
Pick a name for your target. Call that <target>.
Call the name for your CPU architecture <cpu>.
You need to create <target>.c and config/<target>.mt,
and add a case for it to a case statements in bfd/configure.host and
bfd/config.bfd, which associates each canonical host type with a BFD
host type (used as the base of the makefile fragment names), and to the
table in bfd/configure.in which associates each target vector with
the .o files it uses.

config/<target>.mt is a Makefile fragment.
The following is usually enough:
DEFAULT_VECTOR=<target>_vec
SELECT_ARCHITECTURES=bfd_<cpu>_arch

See the list of cpu types in archures.c, or "ls cpu-*.c".
If your architecture is new, you need to add it to the tables
in bfd/archures.c, opcodes/configure.in, and binutils/objdump.c.

For more information about .mt and .mh files, see config/README.

The file <target>.c is the hard part.  It implements the
bfd_target <target>_vec, which includes pointers to
functions that do the actual <target>-specific methods.

Porting to a <target> that uses the a.out binary format
-------------------------------------------------------

In this case, the include file aout-target.h probaby does most
of what you need. The program gen-aout generates <target>.c for
you automatically for many a.out systems.  Do:
	make gen-aout
	./gen-aout <target> > <target>.c
(This only works if you are building on the target ("native").
If you must make a cross-port from scratch, copy the most
similar existing file that includes aout-target.h, and fix what is wrong.)

Check the parameters in <target>.c, and fix anything that is wrong.
(Also let us know about it; perhaps we can improve gen-aout.c.)

TARGET_IS_BIG_ENDIAN_P
	Should be defined if <target> is big-endian.

N_HEADER_IN_TEXT(x)
	See discussion in ../include/aout/aout64.h.

BYTES_IN_WORD
	Number of bytes per word. (Usually 4 but can be 8.)

ARCH
	Number of bits per word.  (Usually 32, but can be 64.)

ENTRY_CAN_BE_ZERO
	Define if the extry point (start address of an
	executable program) can be 0x0.

TEXT_START_ADDR
	The address of the start of the text segemnt in
	virtual memory.  Normally, the same as the entry point.

TARGET_PAGE_SIZE

SEGMENT_SIZE
        Usually, the same as the TARGET_PAGE_SIZE.
        Alignment needed for the data segment.

TARGETNAME
	The name of the target, for run-time lookups.
	Usually "a.out-<target>"
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import GDB in its full glory (all 25mb).  We'll put it on a diet once it's
fully registered.

(This is the second try, the first import ignored .info files but not .info-*
 files, for some reason.  I'm going to make this consistent.)

Reviewed by:	core
Approved for:	2.2
@
text
@@


1.1.1.2
log
@This file was not part of the GDB 5.2.1 import and should have been
deleted from the vendor branch.
@
text
@@


1.1.1.1.4.1
log
@MFC: Import gdb-4.18

Approved by: core
@
text
@@
