head	1.2;
access;
symbols
	gdb-17-1:1.1.1.7
	gdb-16-3:1.1.1.6
	perseant-exfatfs-base-20250801:1.2
	gdb-15-1:1.1.1.6
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.6
	perseant-exfatfs-base:1.2
	netbsd-8-3-RELEASE:1.1.1.3
	netbsd-9-4-RELEASE:1.1.1.4
	gdb-13-2:1.1.1.5
	netbsd-9-3-RELEASE:1.1.1.4
	cjep_sun2x:1.2.0.4
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	netbsd-9-2-RELEASE:1.1.1.4
	cjep_staticlib_x:1.2.0.2
	cjep_staticlib_x-base:1.2
	netbsd-9-1-RELEASE:1.1.1.4
	phil-wifi-20200421:1.1.1.4
	phil-wifi-20200411:1.1.1.4
	is-mlppp:1.1.1.4.0.8
	is-mlppp-base:1.1.1.4
	phil-wifi-20200406:1.1.1.4
	netbsd-8-2-RELEASE:1.1.1.3
	netbsd-9-0-RELEASE:1.1.1.4
	netbsd-9-0-RC2:1.1.1.4
	netbsd-9-0-RC1:1.1.1.4
	phil-wifi-20191119:1.1.1.4
	netbsd-9:1.1.1.4.0.6
	netbsd-9-base:1.1.1.4
	phil-wifi-20190609:1.1.1.4
	netbsd-8-1-RELEASE:1.1.1.3
	gdb-8-3:1.1.1.4
	netbsd-8-1-RC1:1.1.1.3
	pgoyette-compat-merge-20190127:1.1.1.4
	pgoyette-compat-20190127:1.1.1.4
	pgoyette-compat-20190118:1.1.1.4
	pgoyette-compat-1226:1.1.1.4
	pgoyette-compat-1126:1.1.1.4
	pgoyette-compat-1020:1.1.1.4
	pgoyette-compat-0930:1.1.1.4
	pgoyette-compat-0906:1.1.1.4
	netbsd-7-2-RELEASE:1.1.1.3
	pgoyette-compat-0728:1.1.1.4
	netbsd-8-0-RELEASE:1.1.1.3
	phil-wifi:1.1.1.4.0.4
	phil-wifi-base:1.1.1.4
	pgoyette-compat-0625:1.1.1.4
	netbsd-8-0-RC2:1.1.1.3
	pgoyette-compat-0521:1.1.1.4
	pgoyette-compat-0502:1.1.1.4
	pgoyette-compat-0422:1.1.1.4
	netbsd-8-0-RC1:1.1.1.3
	pgoyette-compat-0415:1.1.1.4
	pgoyette-compat-0407:1.1.1.4
	pgoyette-compat-0330:1.1.1.4
	pgoyette-compat-0322:1.1.1.4
	pgoyette-compat-0315:1.1.1.4
	netbsd-7-1-2-RELEASE:1.1.1.3
	pgoyette-compat:1.1.1.4.0.2
	pgoyette-compat-base:1.1.1.4
	netbsd-7-1-1-RELEASE:1.1.1.3
	gdb-8-0-1:1.1.1.4
	matt-nb8-mediatek:1.1.1.3.0.20
	matt-nb8-mediatek-base:1.1.1.3
	perseant-stdc-iso10646:1.1.1.3.0.18
	perseant-stdc-iso10646-base:1.1.1.3
	netbsd-8:1.1.1.3.0.16
	netbsd-8-base:1.1.1.3
	prg-localcount2-base3:1.1.1.3
	prg-localcount2-base2:1.1.1.3
	prg-localcount2-base1:1.1.1.3
	prg-localcount2:1.1.1.3.0.14
	prg-localcount2-base:1.1.1.3
	pgoyette-localcount-20170426:1.1.1.3
	bouyer-socketcan-base1:1.1.1.3
	pgoyette-localcount-20170320:1.1.1.3
	netbsd-7-1:1.1.1.3.0.12
	netbsd-7-1-RELEASE:1.1.1.3
	netbsd-7-1-RC2:1.1.1.3
	netbsd-7-nhusb-base-20170116:1.1.1.3
	bouyer-socketcan:1.1.1.3.0.10
	bouyer-socketcan-base:1.1.1.3
	pgoyette-localcount-20170107:1.1.1.3
	netbsd-7-1-RC1:1.1.1.3
	pgoyette-localcount-20161104:1.1.1.3
	netbsd-7-0-2-RELEASE:1.1.1.3
	gdb-7-12:1.1.1.3
	localcount-20160914:1.1.1.3
	netbsd-7-nhusb:1.1.1.3.0.8
	netbsd-7-nhusb-base:1.1.1.3
	pgoyette-localcount-20160806:1.1.1.3
	pgoyette-localcount-20160726:1.1.1.3
	pgoyette-localcount:1.1.1.3.0.6
	pgoyette-localcount-base:1.1.1.3
	netbsd-7-0-1-RELEASE:1.1.1.3
	gdb-7-10-1:1.1.1.3
	netbsd-7-0:1.1.1.3.0.4
	netbsd-7-0-RELEASE:1.1.1.3
	gdb-7-9-1:1.1.1.3
	netbsd-7-0-RC3:1.1.1.3
	netbsd-7-0-RC2:1.1.1.3
	netbsd-7-0-RC1:1.1.1.3
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.3.0.2
	netbsd-7-base:1.1.1.3
	gdb-7-7-1:1.1.1.3
	yamt-pagecache-base9:1.1.1.2
	yamt-pagecache-tag8:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.1.1.2.0.2
	tls-earlyentropy-base:1.1.1.3
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.2
	riastradh-drm2-base3:1.1.1.2
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	gdb-7-6-1:1.1.1.2
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.12
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.16
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.14
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.10
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.8
	tls-maxphys-base:1.1.1.3
	matt-nb6-plus:1.1.1.1.0.6
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	netbsd-6:1.1.1.1.0.4
	netbsd-6-base:1.1.1.1
	yamt-pagecache-base3:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.2
	yamt-pagecache-base:1.1.1.1
	gdb-7-3-1:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2020.09.15.02.05.16;	author christos;	state dead;
branches;
next	1.1;
commitid	NMKJ48zQgGcZm5oC;

1.1
date	2011.09.24.19.47.37;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2011.09.24.19.47.37;	author christos;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.8.1;
next	1.1.1.2;

1.1.1.2
date	2013.10.03.15.48.52;	author christos;	state Exp;
branches
	1.1.1.2.2.1;
next	1.1.1.3;

1.1.1.3
date	2014.06.22.23.40.07;	author christos;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2017.11.28.18.19.06;	author christos;	state Exp;
branches;
next	1.1.1.5;
commitid	rE0LxHFEMFCrCPgA;

1.1.1.5
date	2023.07.30.22.45.53;	author christos;	state Exp;
branches;
next	1.1.1.6;
commitid	HEIv4Prd74m1wSyE;

1.1.1.6
date	2024.08.12.21.39.06;	author christos;	state Exp;
branches;
next	1.1.1.7;
commitid	dWD83H91pFit0AlF;

1.1.1.7
date	2026.03.14.20.44.45;	author christos;	state Exp;
branches;
next	;
commitid	FYd84EijbJAv3ZxG;

1.1.1.1.2.1
date	2014.05.22.16.00.31;	author yamt;	state Exp;
branches;
next	;

1.1.1.1.8.1
date	2014.08.19.23.58.38;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.2.2.1
date	2014.08.10.07.11.38;	author tls;	state Exp;
branches;
next	;
commitid	I2ai4RKW1zrCHMLx;


desc
@@


1.2
log
@merge conflicts
@
text
@
@@example
/* Set to N to open the next N BFDs using an alternate id space.  */
extern unsigned int bfd_use_reserved_id;
@@end example
@@section Opening and closing BFDs


@@subsection Functions for opening and closing


@@findex bfd_fopen
@@subsubsection @@code{bfd_fopen}
@@strong{Synopsis}
@@example
bfd *bfd_fopen (const char *filename, const char *target,
    const char *mode, int fd);
@@end example
@@strong{Description}@@*
Open the file @@var{filename} with the target @@var{target}.
Return a pointer to the created BFD.  If @@var{fd} is not -1,
then @@code{fdopen} is used to open the file; otherwise, @@code{fopen}
is used.  @@var{mode} is passed directly to @@code{fopen} or
@@code{fdopen}. 

Calls @@code{bfd_find_target}, so @@var{target} is interpreted as by
that function.

The new BFD is marked as cacheable iff @@var{fd} is -1.

If @@code{NULL} is returned then an error has occured.   Possible errors
are @@code{bfd_error_no_memory}, @@code{bfd_error_invalid_target} or
@@code{system_call} error.

@@findex bfd_openr
@@subsubsection @@code{bfd_openr}
@@strong{Synopsis}
@@example
bfd *bfd_openr (const char *filename, const char *target);
@@end example
@@strong{Description}@@*
Open the file @@var{filename} (using @@code{fopen}) with the target
@@var{target}.  Return a pointer to the created BFD.

Calls @@code{bfd_find_target}, so @@var{target} is interpreted as by
that function.

If @@code{NULL} is returned then an error has occured.   Possible errors
are @@code{bfd_error_no_memory}, @@code{bfd_error_invalid_target} or
@@code{system_call} error.

@@findex bfd_fdopenr
@@subsubsection @@code{bfd_fdopenr}
@@strong{Synopsis}
@@example
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
@@end example
@@strong{Description}@@*
@@code{bfd_fdopenr} is to @@code{bfd_fopenr} much like @@code{fdopen} is to
@@code{fopen}.  It opens a BFD on a file already described by the
@@var{fd} supplied.

When the file is later @@code{bfd_close}d, the file descriptor will
be closed.  If the caller desires that this file descriptor be
cached by BFD (opened as needed, closed as needed to free
descriptors for other opens), with the supplied @@var{fd} used as
an initial file descriptor (but subject to closure at any time),
call bfd_set_cacheable(bfd, 1) on the returned BFD.  The default
is to assume no caching; the file descriptor will remain open
until @@code{bfd_close}, and will not be affected by BFD operations
on other files.

Possible errors are @@code{bfd_error_no_memory},
@@code{bfd_error_invalid_target} and @@code{bfd_error_system_call}.

@@findex bfd_openstreamr
@@subsubsection @@code{bfd_openstreamr}
@@strong{Synopsis}
@@example
bfd *bfd_openstreamr (const char *, const char *, void *);
@@end example
@@strong{Description}@@*
Open a BFD for read access on an existing stdio stream.  When
the BFD is passed to @@code{bfd_close}, the stream will be closed.

@@findex bfd_openr_iovec
@@subsubsection @@code{bfd_openr_iovec}
@@strong{Synopsis}
@@example
bfd *bfd_openr_iovec (const char *filename, const char *target,
    void *(*open_func) (struct bfd *nbfd,
    void *open_closure),
    void *open_closure,
    file_ptr (*pread_func) (struct bfd *nbfd,
    void *stream,
    void *buf,
    file_ptr nbytes,
    file_ptr offset),
    int (*close_func) (struct bfd *nbfd,
    void *stream),
    int (*stat_func) (struct bfd *abfd,
    void *stream,
    struct stat *sb));
@@end example
@@strong{Description}@@*
Create and return a BFD backed by a read-only @@var{stream}.
The @@var{stream} is created using @@var{open_func}, accessed using
@@var{pread_func} and destroyed using @@var{close_func}.

Calls @@code{bfd_find_target}, so @@var{target} is interpreted as by
that function.

Calls @@var{open_func} (which can call @@code{bfd_zalloc} and
@@code{bfd_get_filename}) to obtain the read-only stream backing
the BFD.  @@var{open_func} either succeeds returning the
non-@@code{NULL} @@var{stream}, or fails returning @@code{NULL}
(setting @@code{bfd_error}).

Calls @@var{pread_func} to request @@var{nbytes} of data from
@@var{stream} starting at @@var{offset} (e.g., via a call to
@@code{bfd_read}).  @@var{pread_func} either succeeds returning the
number of bytes read (which can be less than @@var{nbytes} when
end-of-file), or fails returning -1 (setting @@code{bfd_error}).

Calls @@var{close_func} when the BFD is later closed using
@@code{bfd_close}.  @@var{close_func} either succeeds returning 0, or
fails returning -1 (setting @@code{bfd_error}).

Calls @@var{stat_func} to fill in a stat structure for bfd_stat,
bfd_get_size, and bfd_get_mtime calls.  @@var{stat_func} returns 0
on success, or returns -1 on failure (setting @@code{bfd_error}).

If @@code{bfd_openr_iovec} returns @@code{NULL} then an error has
occurred.  Possible errors are @@code{bfd_error_no_memory},
@@code{bfd_error_invalid_target} and @@code{bfd_error_system_call}.

@@findex bfd_openw
@@subsubsection @@code{bfd_openw}
@@strong{Synopsis}
@@example
bfd *bfd_openw (const char *filename, const char *target);
@@end example
@@strong{Description}@@*
Create a BFD, associated with file @@var{filename}, using the
file format @@var{target}, and return a pointer to it.

Possible errors are @@code{bfd_error_system_call}, @@code{bfd_error_no_memory},
@@code{bfd_error_invalid_target}.

@@findex bfd_close
@@subsubsection @@code{bfd_close}
@@strong{Synopsis}
@@example
bfd_boolean bfd_close (bfd *abfd);
@@end example
@@strong{Description}@@*
Close a BFD. If the BFD was open for writing, then pending
operations are completed and the file written out and closed.
If the created file is executable, then @@code{chmod} is called
to mark it as such.

All memory attached to the BFD is released.

The file descriptor associated with the BFD is closed (even
if it was passed in to BFD by @@code{bfd_fdopenr}).

@@strong{Returns}@@*
@@code{TRUE} is returned if all is ok, otherwise @@code{FALSE}.

@@findex bfd_close_all_done
@@subsubsection @@code{bfd_close_all_done}
@@strong{Synopsis}
@@example
bfd_boolean bfd_close_all_done (bfd *);
@@end example
@@strong{Description}@@*
Close a BFD.  Differs from @@code{bfd_close} since it does not
complete any pending operations.  This routine would be used
if the application had just used BFD for swapping and didn't
want to use any of the writing code.

If the created file is executable, then @@code{chmod} is called
to mark it as such.

All memory attached to the BFD is released.

@@strong{Returns}@@*
@@code{TRUE} is returned if all is ok, otherwise @@code{FALSE}.

@@findex bfd_create
@@subsubsection @@code{bfd_create}
@@strong{Synopsis}
@@example
bfd *bfd_create (const char *filename, bfd *templ);
@@end example
@@strong{Description}@@*
Create a new BFD in the manner of @@code{bfd_openw}, but without
opening a file. The new BFD takes the target from the target
used by @@var{templ}. The format is always set to @@code{bfd_object}.

@@findex bfd_make_writable
@@subsubsection @@code{bfd_make_writable}
@@strong{Synopsis}
@@example
bfd_boolean bfd_make_writable (bfd *abfd);
@@end example
@@strong{Description}@@*
Takes a BFD as created by @@code{bfd_create} and converts it
into one like as returned by @@code{bfd_openw}.  It does this
by converting the BFD to BFD_IN_MEMORY.  It's assumed that
you will call @@code{bfd_make_readable} on this bfd later.

@@strong{Returns}@@*
@@code{TRUE} is returned if all is ok, otherwise @@code{FALSE}.

@@findex bfd_make_readable
@@subsubsection @@code{bfd_make_readable}
@@strong{Synopsis}
@@example
bfd_boolean bfd_make_readable (bfd *abfd);
@@end example
@@strong{Description}@@*
Takes a BFD as created by @@code{bfd_create} and
@@code{bfd_make_writable} and converts it into one like as
returned by @@code{bfd_openr}.  It does this by writing the
contents out to the memory buffer, then reversing the
direction.

@@strong{Returns}@@*
@@code{TRUE} is returned if all is ok, otherwise @@code{FALSE}.

@@findex bfd_alloc
@@subsubsection @@code{bfd_alloc}
@@strong{Synopsis}
@@example
void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
@@end example
@@strong{Description}@@*
Allocate a block of @@var{wanted} bytes of memory attached to
@@code{abfd} and return a pointer to it.

@@findex bfd_alloc2
@@subsubsection @@code{bfd_alloc2}
@@strong{Synopsis}
@@example
void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
@@end example
@@strong{Description}@@*
Allocate a block of @@var{nmemb} elements of @@var{size} bytes each
of memory attached to @@code{abfd} and return a pointer to it.

@@findex bfd_zalloc
@@subsubsection @@code{bfd_zalloc}
@@strong{Synopsis}
@@example
void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
@@end example
@@strong{Description}@@*
Allocate a block of @@var{wanted} bytes of zeroed memory
attached to @@code{abfd} and return a pointer to it.

@@findex bfd_zalloc2
@@subsubsection @@code{bfd_zalloc2}
@@strong{Synopsis}
@@example
void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
@@end example
@@strong{Description}@@*
Allocate a block of @@var{nmemb} elements of @@var{size} bytes each
of zeroed memory attached to @@code{abfd} and return a pointer to it.

@@findex bfd_calc_gnu_debuglink_crc32
@@subsubsection @@code{bfd_calc_gnu_debuglink_crc32}
@@strong{Synopsis}
@@example
unsigned long bfd_calc_gnu_debuglink_crc32
   (unsigned long crc, const unsigned char *buf, bfd_size_type len);
@@end example
@@strong{Description}@@*
Computes a CRC value as used in the .gnu_debuglink section.
Advances the previously computed @@var{crc} value by computing
and adding in the crc32 for @@var{len} bytes of @@var{buf}.

@@strong{Returns}@@*
Return the updated CRC32 value.

@@findex get_debug_link_info
@@subsubsection @@code{get_debug_link_info}
@@strong{Synopsis}
@@example
char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
@@end example
@@strong{Description}@@*
fetch the filename and CRC32 value for any separate debuginfo
associated with @@var{abfd}. Return NULL if no such info found,
otherwise return filename and update @@var{crc32_out}.

@@findex separate_debug_file_exists
@@subsubsection @@code{separate_debug_file_exists}
@@strong{Synopsis}
@@example
bfd_boolean separate_debug_file_exists
   (char *name, unsigned long crc32);
@@end example
@@strong{Description}@@*
Checks to see if @@var{name} is a file and if its contents
match @@var{crc32}.

@@findex find_separate_debug_file
@@subsubsection @@code{find_separate_debug_file}
@@strong{Synopsis}
@@example
char *find_separate_debug_file (bfd *abfd);
@@end example
@@strong{Description}@@*
Searches @@var{abfd} for a reference to separate debugging
information, scans various locations in the filesystem, including
the file tree rooted at @@var{debug_file_directory}, and returns a
filename of such debugging information if the file is found and has
matching CRC32.  Returns NULL if no reference to debugging file
exists, or file cannot be found.

@@findex bfd_follow_gnu_debuglink
@@subsubsection @@code{bfd_follow_gnu_debuglink}
@@strong{Synopsis}
@@example
char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
@@end example
@@strong{Description}@@*
Takes a BFD and searches it for a .gnu_debuglink section.  If this
section is found, it examines the section for the name and checksum
of a '.debug' file containing auxiliary debugging information.  It
then searches the filesystem for this .debug file in some standard
locations, including the directory tree rooted at @@var{dir}, and if
found returns the full filename.

If @@var{dir} is NULL, it will search a default path configured into
libbfd at build time.  [XXX this feature is not currently
implemented].

@@strong{Returns}@@*
@@code{NULL} on any errors or failure to locate the .debug file,
otherwise a pointer to a heap-allocated string containing the
filename.  The caller is responsible for freeing this string.

@@findex bfd_create_gnu_debuglink_section
@@subsubsection @@code{bfd_create_gnu_debuglink_section}
@@strong{Synopsis}
@@example
struct bfd_section *bfd_create_gnu_debuglink_section
   (bfd *abfd, const char *filename);
@@end example
@@strong{Description}@@*
Takes a @@var{BFD} and adds a .gnu_debuglink section to it.  The section is sized
to be big enough to contain a link to the specified @@var{filename}.

@@strong{Returns}@@*
A pointer to the new section is returned if all is ok.  Otherwise @@code{NULL} is
returned and bfd_error is set.

@@findex bfd_fill_in_gnu_debuglink_section
@@subsubsection @@code{bfd_fill_in_gnu_debuglink_section}
@@strong{Synopsis}
@@example
bfd_boolean bfd_fill_in_gnu_debuglink_section
   (bfd *abfd, struct bfd_section *sect, const char *filename);
@@end example
@@strong{Description}@@*
Takes a @@var{BFD} and containing a .gnu_debuglink section @@var{SECT}
and fills in the contents of the section to contain a link to the
specified @@var{filename}.  The filename should be relative to the
current directory.

@@strong{Returns}@@*
@@code{TRUE} is returned if all is ok.  Otherwise @@code{FALSE} is returned
and bfd_error is set.

@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@import 7.3.1
@
text
@@


1.1.1.1.8.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d24 1
a24 1
@@code{fdopen}.
a34 5
On error, @@var{fd} is always closed.

A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a51 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a75 5
On error, @@var{fd} is closed.

A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

d80 1
a80 1
bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
a85 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a136 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a149 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a200 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

d287 2
a288 15
@@findex bfd_get_debug_link_info
@@subsubsection @@code{bfd_get_debug_link_info}
@@strong{Synopsis}
@@example
char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
@@end example
@@strong{Description}@@*
Fetch the filename and CRC32 value for any separate debuginfo
associated with @@var{abfd}.  Return NULL if no such info found,
otherwise return filename and update @@var{crc32_out}.  The
returned filename is allocated with @@code{malloc}; freeing it
is the responsibility of the caller.

@@findex bfd_get_alt_debug_link_info
@@subsubsection @@code{bfd_get_alt_debug_link_info}
d291 1
a291 3
char *bfd_get_alt_debug_link_info (bfd * abfd,
    bfd_size_type *buildid_len,
    bfd_byte **buildid_out);
d294 3
a296 6
Fetch the filename and BuildID value for any alternate debuginfo
associated with @@var{abfd}.  Return NULL if no such info found,
otherwise return filename and update @@var{buildid_len} and
@@var{buildid_out}.  The returned filename and build_id are
allocated with @@code{malloc}; freeing them is the
responsibility of the caller.
a308 11
@@findex separate_alt_debug_file_exists
@@subsubsection @@code{separate_alt_debug_file_exists}
@@strong{Synopsis}
@@example
bfd_boolean separate_alt_debug_file_exists
   (char *name, unsigned long crc32);
@@end example
@@strong{Description}@@*
Checks to see if @@var{name} is a file and if its BuildID
matches @@var{buildid}.

d316 6
a321 8
Searches @@var{abfd} for a section called @@var{section_name} which
is expected to contain a reference to a file containing separate
debugging information.  The function scans various locations in
the filesystem, including the file tree rooted at
@@var{debug_file_directory}, and returns the first matching
filename that it finds.  If @@var{check_crc} is TRUE then the
contents of the file must also match the CRC value contained in
@@var{section_name}.  Returns NULL if no valid file could be found.
a345 23
@@findex bfd_follow_gnu_debugaltlink
@@subsubsection @@code{bfd_follow_gnu_debugaltlink}
@@strong{Synopsis}
@@example
char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
@@end example
@@strong{Description}@@*
Takes a BFD and searches it for a .gnu_debugaltlink section.  If this
section is found, it examines the section for the name of a file
containing auxiliary debugging information.  It then searches the
filesystem for this file in a set of standard locations, including
the directory tree rooted at @@var{dir}, and if found returns the
full filename.

If @@var{dir} is NULL, it will search a default path configured into
libbfd at build time.  [FIXME: This feature is not currently
implemented].

@@strong{Returns}@@*
@@code{NULL} on any errors or failure to locate the debug file,
otherwise a pointer to a heap-allocated string containing the
filename.  The caller is responsible for freeing this string.

@


1.1.1.1.2.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d24 1
a24 1
@@code{fdopen}.
a34 2
On error, @@var{fd} is always closed.

a75 2
On error, @@var{fd} is closed.

@


1.1.1.2
log
@Import gdb 7.6.1
News from: http://sourceware.org/gdb/news:

August 30th, 2013: GDB 7.6.1 Released!
The latest version of GDB, version 7.6.1, is available for download.

This is a minor corrective release over GDB 7.6, fixing the following issues:

PR tdep/15420 (Cannot debug threaded programs on newer versions of x86-solaris - Solaris 10, Update 10 or later)
PR remote/15455 (QTro remote packet broken)
PR build/15476 (Build failure due to incomplete enum type in utils.h)
PR server/15594 (tls support in 64x32 x86 gdbserver doesn't extend address to 64 bit)
PR server/15075 (dprintf inteferes with "next")
PR server/15434 (dprintf uses a synchronous 'continue' even in non-stop mode)
PR tui/14880 (In split register layouts, up results in assertion failure in value.c)
PR c++/15519 (GDB 7.6 is 94x slower than GDB 7.5.1 using a certain core file)
PR gdb/15837 (GDB prints entry values for local variables)
PR gdb/15415 (gdb resolves symbolic links when passing argv[0])
PR cli/15603 (CTRL-C can no longer interrupt inferior)
PR gdb/15604 (gdbserver socket leak 7.5 regression)
April 26th, 2013: GDB 7.6 Released!
The latest version of GDB, version 7.6, is available for download.

Changes in this release include:

New native configurations (ARM AArch64 GNU/Linux, FreeBSD/powerpc, 86_64/Cygwin and Tilera TILE-Gx GNU/Linux)
New target configurations (ARM AArch64, ARM AArch64 GNU/Linux, Lynx 178 PowerPC, x86_64/Cygwin, and Tilera TILE-Gx GNU/Linux)
Support for the "mini debuginfo" section, .gnu_debugdata
The C++ ABI now defaults to the GNU v3 ABI
More Python scripting improvements
Some GDB/MI improvements
New configure options, new commands, and options
New remote packets
A new "target record-btrace" has been added while the "target record" command has been renamed to "target record-full"
See the NEWS file for a more complete and detailed list of what this release includes.
March 12th, 2013: GDB 7.6 branch created
The GDB 7.6 branch (gdb_7_6-branch) has been created. To check out a copy of the branch use:

cvs -d :pserver:anoncvs@@sourceware.org:/cvs/src co -r gdb_7_6-branch gdb
November 29th, 2012: GDB 7.5.1 Released!
The latest version of GDB, version 7.5.1, is available for download.

This is a minor corrective release over GDB 7.5, fixing the following issues:

An "Attempt to dereference a generic pointer" errors (-var-create).
Backtrace problems on x32 (PR backtrace/14646).
next/step/finish problems on x32 (PR gdb/14647).
A "malformed linespec error: unexpected keyword, [...]" error (PR breakpoints/14643).
GDB crash while stepping through powerpc (32bits) code.
A failed assertion in linux_ptrace_test_ret_to_nx.
A "!frame_id_inlined_p (frame_id)" failed assertion.
A "No more reverse-execution history." error during reverse "next" execution (PR 14548).
Incomplete command descriptions in "apropos" output.
PR gdb/14494 (a GDB crash difficult to characterize).
Various build warnings.
August 17th, 2012: GDB 7.5 Released!
The latest version of GDB, version 7.5, is available for download.

Changes in this release include:

Go language support.
New targets (x32 ABI, microMIPS, Renesas RL78, HP OpenVMS ia64).
More Python scripting improvements.
SDT (Static Defined Tracing) probes support with SystemTap probes.
GDBserver improvements (stdio connections, target-side evaluation of breakpoint conditions, remote protocol improvements).
Other miscellaneous improvements (ability to stop when a shared library is loaded/unloaded, dynamic printf, etc).
Reverse debugging on ARM.
The binary "gdbtui" has been abandoned and can no longer be built. Use "gdb -tui" instead.
See the NEWS file for a more complete and detailed list of what this release includes.
July 17th, 2012: GDB 7.5 branch created
The GDB 7.5 branch (gdb_7_5-branch) has been created. To check out a copy of the branch use:

cvs -d :pserver:anoncvs@@sourceware.org:/cvs/src co -r gdb_7_5-branch gdb
April 26th, 2012: GDB 7.4.1 Released!
The latest version of GDB, version 7.4.1, is available for download.

This is a minor corrective release over GDB 7.4, fixing the following issues:

[GDB/MI] Error when resuming program execution in all-stop mode ("Cannot execute this command without a live selected thread").
[Pascal] Polluted display of class methods parameters.
[target remote] Errror when connecting to remote target where disconnected tracing is in effect.
[AVX] Float and ymm* register values not available.
[GDB] Crash when using the "finish" command.
[build] makeinfo should not be required to build GDB.
January 24th, 2012: GDB 7.4 Released!
The latest version of GDB, version 7.4, is available for download.

Changes in this release include:

Many Python scripting improvements
Better support for ambiguous linespecs
Masked watchpoints
Tracepoint support improvements
Support for Texas Instruments TMS320C6x (tic6x-*-*)
A Renesas RL78 simulator (rl78-*-elf)
Some minor Remote protocol extensions and GDB/MI changes
See the NEWS file for a more complete and detailed list of what this release includes. Note that the gdbtui binary is deprecated, starting with GDB 7.5. Use "gdb -tui" instead.
January 9, 2012: Extensibility support using Guile
GDB ought to support extensibility using Guile, the GNU extensibility package (an implementation of Scheme). We are looking for people to write the code to interface the two. Please write to gdb-patches AT sourceware DOT org if you are interested.

December 13, 2011: GDB 7.4 branch created
The GDB 7.4 branch (gdb_7_4-branch) has been created. To check out a copy of the branch use:

cvs -d :pserver:anoncvs@@sourceware.org:/cvs/src co -r gdb_7_4-branch gdb
September 30, 2011: Release Mistakes in GDB Versions 6.0 - 7.3
A mistake has been detected in the release tar files for all GDB releases from version 6.0 to version 7.3 (included). The mistake has been corrected, and the FSF issued the following announcements:

Making up for a release mistake in GDB versions 6.0 - 6.6
Making up for a release mistake in GDB versions 6.7 - 7.3
@
text
@d24 1
a24 1
@@code{fdopen}.
a34 2
On error, @@var{fd} is always closed.

a75 2
On error, @@var{fd} is closed.

@


1.1.1.2.2.1
log
@Rebase.
@
text
@a36 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a53 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a79 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

d84 1
a84 1
bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
a89 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a140 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a153 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a204 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

d291 2
a292 2
@@findex bfd_get_debug_link_info
@@subsubsection @@code{bfd_get_debug_link_info}
d295 1
a295 1
char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
d298 3
a300 21
Fetch the filename and CRC32 value for any separate debuginfo
associated with @@var{abfd}.  Return NULL if no such info found,
otherwise return filename and update @@var{crc32_out}.  The
returned filename is allocated with @@code{malloc}; freeing it
is the responsibility of the caller.

@@findex bfd_get_alt_debug_link_info
@@subsubsection @@code{bfd_get_alt_debug_link_info}
@@strong{Synopsis}
@@example
char *bfd_get_alt_debug_link_info (bfd * abfd,
    bfd_size_type *buildid_len,
    bfd_byte **buildid_out);
@@end example
@@strong{Description}@@*
Fetch the filename and BuildID value for any alternate debuginfo
associated with @@var{abfd}.  Return NULL if no such info found,
otherwise return filename and update @@var{buildid_len} and
@@var{buildid_out}.  The returned filename and build_id are
allocated with @@code{malloc}; freeing them is the
responsibility of the caller.
a312 11
@@findex separate_alt_debug_file_exists
@@subsubsection @@code{separate_alt_debug_file_exists}
@@strong{Synopsis}
@@example
bfd_boolean separate_alt_debug_file_exists
   (char *name, unsigned long crc32);
@@end example
@@strong{Description}@@*
Checks to see if @@var{name} is a file and if its BuildID
matches @@var{buildid}.

d320 6
a325 8
Searches @@var{abfd} for a section called @@var{section_name} which
is expected to contain a reference to a file containing separate
debugging information.  The function scans various locations in
the filesystem, including the file tree rooted at
@@var{debug_file_directory}, and returns the first matching
filename that it finds.  If @@var{check_crc} is TRUE then the
contents of the file must also match the CRC value contained in
@@var{section_name}.  Returns NULL if no valid file could be found.
a349 23
@@findex bfd_follow_gnu_debugaltlink
@@subsubsection @@code{bfd_follow_gnu_debugaltlink}
@@strong{Synopsis}
@@example
char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
@@end example
@@strong{Description}@@*
Takes a BFD and searches it for a .gnu_debugaltlink section.  If this
section is found, it examines the section for the name of a file
containing auxiliary debugging information.  It then searches the
filesystem for this file in a set of standard locations, including
the directory tree rooted at @@var{dir}, and if found returns the
full filename.

If @@var{dir} is NULL, it will search a default path configured into
libbfd at build time.  [FIXME: This feature is not currently
implemented].

@@strong{Returns}@@*
@@code{NULL} on any errors or failure to locate the debug file,
otherwise a pointer to a heap-allocated string containing the
filename.  The caller is responsible for freeing this string.

@


1.1.1.3
log
@ChangeLog:

2013-12-19  Keven Boell  <keven.boell@@intel.com>

	* cp-namespace.c (cp_lookup_nested_symbol): Enable
	nested lookups for fortran modules.
	* dwarf2read.c (read_module): Add fortran module to
	the symbol table.
	(add_partial_symbol, add_partial_module): Add fortran
	module to the partial symbol table.
	(new_symbol_full): Create full symbol for fortran module.
	* f-exp.y (yylex): Add new module domain to be parsed.
	* symtab.h: New domain for fortran modules.

2013-12-19  Keven Boell  <keven.boell@@intel.com>

	* f-exp.y (yylex): Add domain array to enable lookup
	in multiple domains. Loop over lookup domains and try
	to find requested symbol. Add STRUCT_DOMAIN to lookup
	domains to be able to query for user defined types.

2013-12-13  Francois-Xavier Coudert  <fxcoudert@@gcc.gnu.org>

	* configure.ac: Add user-friendly check for native x86_64-linux
	multilibs.
	* configure: Regenerate.

2013-11-23  Alan Modra  <amodra@@gmail.com>

	* config.sub, config.guess: Import from upstream.

2013-11-07  Thomas Schwinge  <thomas@@codesourcery.com>

	* Makefile.in: Regenerate.

	* Makefile.tpl: Fix typo.
	* Makefile.in: Regenerate partially.

2013-11-04  Balaji V. Iyer  <balaji.v.iyer@@intel.com>

	* configure.ac: Added libcilkrts to noconfig list when C++ is not
	supported.
	* configure: Regenerated.

2013-10-30  Jason Merrill  <jason@@redhat.com>

	* Makefile.tpl (STAGE1_CONFIGURE_FLAGS): Pass
	--disable-build-format-warnings.

2013-10-29  Balaji V. Iyer  <balaji.v.iyer@@intel.com>

	* Makefile.def: Add libcilkrts to target_modules.  Make libcilkrts
	depend on libstdc++ and libgcc.
	* configure: Regenerate.
	* configure.ac: Added libcilkrts to target binaries.  Also, restrict
	libcilkrts for POSIX and i*86, and x86_64 architectures.
	* Makefile.in: Added libcilkrts related fields to support building it.

2013-10-26  Jeff Law  <law@@redhat.com>

	* Makefile.def (target_modules): Remove libmudflap
	(languages): Remove check-target-libmudflap).
	* Makefile.in: Rebuilt.
	* Makefile.tpl (check-target-libmudflap-c++): Remove.
	* configure.ac (target_libraries): Remove target-libmudflap.
	Remove checks which disabled libmudflap on some systems.
	* configure: Rebuilt.
	* libmudflap: Directory removed.

2013-10-16  Jan-Benedict Glaw  <jbglaw@@lug-owl.de>

	* configure.ac: Update from GCC.
	* configure: Regenerate.

2013-10-15  Hans-Peter Nilsson  <hp@@axis.com>

	* src-release (do-proto-toplevel): Support subdir-path-prefixed
	files in SUPPORT_FILES.
	(SIM_SUPPORT_DIRS): New variable.
	(sim.tar.bz2): New rule.

2013-10-08  Jan-Benedict Glaw  <jbglaw@@lug-owl.de>

	* configure.ac: Update from GCC.
	* configure: Regenerate.

2013-10-01  Jeff Johnston  <jjohnstn@@redhat.com>

	* COPYING.NEWLIB: Update with new copyright.

2013-09-21  Jan-Benedict Glaw  <jbglaw@@lug-owl.de>

	* configure.ac: Update from GCC.
	* configure: Regenerate.

2013-09-20  Alan Modra  <amodra@@gmail.com>

	* libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
	ppc host match.  Support little-endian powerpc linux hosts.

2013-08-16  Joel Brobecker  <brobecker@@adacore.com>

	* src-release (VER): When using $(TOOL)/common/create-version.sh,
	strip the "-cvs" suffix from the version number if present.

2013-08-12  Jan-Benedict Glaw  <jbglaw@@lug-owl.de>

	* configure.ac: Sync with GCC repo.
	* Makefile.def: Ditto.
	* configure: Regenerate.
	* Makefile.in: Ditto.

2013-07-22  Joel Brobecker  <brobecker@@adacore.com>

	* src-release (VER): Use $(TOOL)/common/create-version.sh
	if it exists.

2013-06-22  Richard Sandiford  <rdsandiford@@googlemail.com>

	* configure.ac (mips*-*-bsd*, mips*-*-ultrix*, mips*-*-osf*)
	(mips*-*-ecoff*, mips*-*-pe*, mips*-*-irix* [v4 and earlier])
	(mips*-*-lnews*, mips*-*-riscos*): Add gas and ld to noconfigdirs.
	* configure: Regenerate.

2013-06-01  George Thomas <george.thomas@@atmel.com>

	* include/opcode/avr.h: Rename AVR_ISA_XCH to AVR_ISA_RMW. Remove
	from AVR_ISA_XMEGA and add new AVR_ISA_XMEGAU

2013-05-06  Sandra Loosemore  <sandra@@codesourcery.com>

	* COPYING.NEWLIB: Add Altera Corporation copyright.

2013-04-29  Jan-Benedict Glaw  <jbglaw@@lug-owl.de>

	* config.guess: Update from config repo.
	* config.sub: Ditto.

2013-04-22  Jan-Benedict Glaw  <jbglaw@@lug-owl.de>

	* Makefile.def: Sync with GCC.
	* Makefile.in: Regenerate.

2013-04-22  Jan-Benedict Glaw  <jbglaw@@lug-owl.de>

	* configure.ac: Sync with GCC.
	* configure: Regenerate.

2013-03-22  Mike Frysinger  <vapier@@gentoo.org>

	* src-release (VER): Change bfd/configure.in sed to use the new
	`bfd/configure --version` output.
@
text
@a36 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a53 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a79 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

d84 1
a84 1
bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
a89 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a140 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a153 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

a204 3
A copy of the @@var{filename} argument is stored in the newly created
BFD.  It can be accessed via the bfd_get_filename() macro.

d291 2
a292 2
@@findex bfd_get_debug_link_info
@@subsubsection @@code{bfd_get_debug_link_info}
d295 1
a295 1
char *bfd_get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
d298 3
a300 21
Fetch the filename and CRC32 value for any separate debuginfo
associated with @@var{abfd}.  Return NULL if no such info found,
otherwise return filename and update @@var{crc32_out}.  The
returned filename is allocated with @@code{malloc}; freeing it
is the responsibility of the caller.

@@findex bfd_get_alt_debug_link_info
@@subsubsection @@code{bfd_get_alt_debug_link_info}
@@strong{Synopsis}
@@example
char *bfd_get_alt_debug_link_info (bfd * abfd,
    bfd_size_type *buildid_len,
    bfd_byte **buildid_out);
@@end example
@@strong{Description}@@*
Fetch the filename and BuildID value for any alternate debuginfo
associated with @@var{abfd}.  Return NULL if no such info found,
otherwise return filename and update @@var{buildid_len} and
@@var{buildid_out}.  The returned filename and build_id are
allocated with @@code{malloc}; freeing them is the
responsibility of the caller.
a312 11
@@findex separate_alt_debug_file_exists
@@subsubsection @@code{separate_alt_debug_file_exists}
@@strong{Synopsis}
@@example
bfd_boolean separate_alt_debug_file_exists
   (char *name, unsigned long crc32);
@@end example
@@strong{Description}@@*
Checks to see if @@var{name} is a file and if its BuildID
matches @@var{buildid}.

d320 6
a325 8
Searches @@var{abfd} for a section called @@var{section_name} which
is expected to contain a reference to a file containing separate
debugging information.  The function scans various locations in
the filesystem, including the file tree rooted at
@@var{debug_file_directory}, and returns the first matching
filename that it finds.  If @@var{check_crc} is TRUE then the
contents of the file must also match the CRC value contained in
@@var{section_name}.  Returns NULL if no valid file could be found.
a349 23
@@findex bfd_follow_gnu_debugaltlink
@@subsubsection @@code{bfd_follow_gnu_debugaltlink}
@@strong{Synopsis}
@@example
char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir);
@@end example
@@strong{Description}@@*
Takes a BFD and searches it for a .gnu_debugaltlink section.  If this
section is found, it examines the section for the name of a file
containing auxiliary debugging information.  It then searches the
filesystem for this file in a set of standard locations, including
the directory tree rooted at @@var{dir}, and if found returns the
full filename.

If @@var{dir} is NULL, it will search a default path configured into
libbfd at build time.  [FIXME: This feature is not currently
implemented].

@@strong{Returns}@@*
@@code{NULL} on any errors or failure to locate the debug file,
otherwise a pointer to a heap-allocated string containing the
filename.  The caller is responsible for freeing this string.

@


1.1.1.4
log
@Import gdb-8.0.1
@
text
@d93 1
a93 2
bfd *bfd_openstreamr (const char * filename, const char * target,
    void * stream);
a311 23
@@findex bfd_get_debug_link_info_1
@@subsubsection @@code{bfd_get_debug_link_info_1}
@@strong{Synopsis}
@@example
char *bfd_get_debug_link_info_1 (bfd *abfd, void *crc32_out);
@@end example
@@strong{Description}@@*
Extracts the filename and CRC32 value for any separate debug
information file associated with @@var{abfd}.

The @@var{crc32_out} parameter is an untyped pointer because
this routine is used as a @@code{get_func_type} function, but it
is expected to be an unsigned long pointer.

@@strong{Returns}@@*
The filename of the associated debug information file, or NULL
if there is no such file.  If the filename was found then the
contents of @@var{crc32_out} are updated to hold the corresponding
CRC32 value for the file.

The returned filename is allocated with @@code{malloc}; freeing
it is the responsibility of the caller.

d319 5
a323 11
Extracts the filename and CRC32 value for any separate debug
information file associated with @@var{abfd}.

@@strong{Returns}@@*
The filename of the associated debug information file, or NULL
if there is no such file.  If the filename was found then the
contents of @@var{crc32_out} are updated to hold the corresponding
CRC32 value for the file.

The returned filename is allocated with @@code{malloc}; freeing
it is the responsibility of the caller.
d338 2
a339 2
allocated with @@code{malloc}; freeing them is the responsibility
of the caller.
d346 1
a346 1
   (char *name, void *crc32_p);
d350 1
a350 5
match @@var{crc32}, which is a pointer to an @@code{unsigned
long} containing a CRC32.

The @@var{crc32_p} parameter is an untyped pointer because
this routine is used as a @@code{check_func_type} function.
d357 1
a357 1
   (char *name, void *unused);
d360 2
a361 1
Checks to see if @@var{name} is a file.
d367 11
a377 22
char *find_separate_debug_file
   (bfd *abfd, const char *dir, bfd_boolean include_dirs,
    get_func_type get, check_func_type check, void *data);
@@end example
@@strong{Description}@@*
Searches for a debug information file corresponding to @@var{abfd}.

The name of the separate debug info file is returned by the
@@var{get} function.  This function scans various fixed locations
in the filesystem, including the file tree rooted at @@var{dir}.
If the @@var{include_dirs} parameter is true then the directory
components of @@var{abfd}'s filename will be included in the
searched locations.

@@var{data} is passed unmodified to the @@var{get} and @@var{check}
functions.  It is generally used to implement build-id-like
matching in the callback functions.

@@strong{Returns}@@*
Returns the filename of the first file to be found which
receives a TRUE result from the @@var{check} function.
Returns NULL if no valid file could be found.
d393 3
a395 2
If @@var{dir} is NULL, the search will take place starting at
the current directory.
d416 3
a418 2
If @@var{dir} is NULL, the search will take place starting at
the current directory.
d433 2
a434 3
Takes a @@var{BFD} and adds a .gnu_debuglink section to it.  The
section is sized to be big enough to contain a link to the specified
@@var{filename}.
d437 2
a438 2
A pointer to the new section is returned if all is ok.  Otherwise
@@code{NULL} is returned and bfd_error is set.
a456 77
@@findex get_build_id
@@subsubsection @@code{get_build_id}
@@strong{Synopsis}
@@example
struct bfd_build_id * get_build_id (bfd *abfd);
@@end example
@@strong{Description}@@*
Finds the build-id associated with @@var{abfd}.  If the build-id is
extracted from the note section then a build-id structure is built
for it, using memory allocated to @@var{abfd}, and this is then
attached to the @@var{abfd}.

@@strong{Returns}@@*
Returns a pointer to the build-id structure if a build-id could be
found.  If no build-id is found NULL is returned and error code is
set.

@@findex get_build_id_name
@@subsubsection @@code{get_build_id_name}
@@strong{Synopsis}
@@example
char * get_build_id_name (bfd *abfd, void *build_id_out_p)
@@end example
@@strong{Description}@@*
Searches @@var{abfd} for a build-id, and then constructs a pathname
from it.  The path is computed as .build-id/NN/NN+NN.debug where
NNNN+NN is the build-id value as a hexadecimal string.

@@strong{Returns}@@*
Returns the constructed filename or NULL upon error.
It is the caller's responsibility to free the memory used to hold the
filename.
If a filename is returned then the @@var{build_id_out_p}
parameter (which points to a @@code{struct bfd_build_id}
pointer) is set to a pointer to the build_id structure.

@@findex check_build_id_file
@@subsubsection @@code{check_build_id_file}
@@strong{Synopsis}
@@example
bfd_boolean check_build_id_file (char *name, void *buildid_p);
@@end example
@@strong{Description}@@*
Checks to see if @@var{name} is a readable file and if its build-id
matches @@var{buildid}.

@@strong{Returns}@@*
Returns TRUE if the file exists, is readable, and contains a
build-id which matches the build-id pointed at by
@@var{build_id_p} (which is really a @@code{struct bfd_build_id **}).

@@findex bfd_follow_build_id_debuglink
@@subsubsection @@code{bfd_follow_build_id_debuglink}
@@strong{Synopsis}
@@example
char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir);
@@end example
@@strong{Description}@@*
Takes @@var{abfd} and searches it for a .note.gnu.build-id section.
If this section is found, it extracts the value of the NT_GNU_BUILD_ID
note, which should be a hexadecimal value @@var{NNNN+NN} (for
32+ hex digits).  It then searches the filesystem for a file named
@@var{.build-id/NN/NN+NN.debug} in a set of standard locations,
including the directory tree rooted at @@var{dir}.  The filename
of the first matching file to be found is returned.  A matching
file should contain a .note.gnu.build-id section with the same
@@var{NNNN+NN} note as @@var{abfd}, although this check is currently
not implemented.

If @@var{dir} is NULL, the search will take place starting at
the current directory.

@@strong{Returns}@@*
@@code{NULL} on any errors or failure to locate the debug file,
otherwise a pointer to a heap-allocated string containing the
filename.  The caller is responsible for freeing this string.

@


1.1.1.5
log
@Import gdb-13.2 over gdb-11.0.50

May 27th, 2023: GDB 13.2 Released!
The latest version of GDB, version 13.2, is available for download.

This is a minor corrective release over GDB 13.1, fixing the following issues:

PR testsuite/30158 (rustc testsuite fails with 13.1, apparently
		    worked before with trunk 20230114 on i686-linux-gnu and
		    powerpc64le-linux-gnu)
PR gdb/30214 (GDB 13.1 does not compile on FreeBSD 13.1)
PR gdb/30240 ((linux/aarch) thread.c:86: internal-error: inferior_thread:
              Assertion `current_thread_ != nullptr' failed)
PR gdb/30249 ([13 regression] hookpost-extended-remote will not work)
PR exp/30271 (Addresses of static thread_local fields are badly
              calculated sometimes)
PR symtab/30357 (Segmentation fault for the 'start' command)
PR symtab/30369 ([gdb/symtab] False match issue in
skip_prologue_using_linetable)

PR gdb/30423 (Build failures with clang 16)
PR build/30450 (Build failure (linux-low.cc:5393:45: error: expected
		':' before ')' token) with musl-1.2.4)

See the NEWS file for a more complete and detailed list of what this release
 includes.

Feb 19th, 2023: GDB 13.1 Released!

The latest version of GDB, version 13.1, is available for download.
This version of GDB includes the following changes and enhancements:
Support for the following new targets has been added in both GDB and GDBserver:
GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux*
GNU/Linux/CSKY (gdbserver) csky*-*linux*
The Windows native target now supports target async.
FreeBSD:
Arm and AArch64: Support for Thread Local Storage (TLS) variables
Hardware watchpoint support on AArch64 FreeBSD
Floating-point support has now been added on LoongArch GNU/Linux.
New commands:
set print nibbles [on|off]
show print nibbles

This controls whether the 'print/t' command will display binary
values in groups of four bits, known as "nibbles". The default is
'off'.

Various styling-related commands. See the gdb/NEWS file for more details.
Various maintenance commands. These are normally aimed at GDB
experts or developers. See the gdb/NEWS file for more details.

Python API improvements:
New Python API for instruction disassembly.

The new attribute 'locations' of gdb.Breakpoint returns a list of
gdb.BreakpointLocation objects specifying the locations where the
breakpoint is inserted into the debuggee.
New Python type gdb.BreakpointLocation.
New function gdb.format_address(ADDRESS, PROGSPACE, ARCHITECTURE)
that formats ADDRESS as 'address '
New function gdb.current_language that returns the name of the
current language. Unlike gdb.parameter('language'), this will never
return 'auto'.
New function gdb.print_options that returns a dictionary of the
prevailing print options, in the form accepted by gdb.Value.format_string.
New method gdb.Frame.language that returns the name of the frame's language.
gdb.Value.format_string now uses the format provided by 'print',
if it is called during a 'print' or other similar operation.
gdb.Value.format_string now accepts the 'summary' keyword. This
can be used to request a shorter representation of a value, the
way that 'set print frame-arguments scalars' does.
The gdb.register_window_type method now restricts the set of
acceptable window names. The first character of a window's name
must start with a character in the set [a-zA-Z], every subsequent
character of a window's name must be in the set [-_.a-zA-Z0-9].
` GDB/MI changes:  MI version 1 is deprecated, and will be removed
in GDB 14.  The async record stating the stopped reason 'breakpoint-hit'
now contains an optional field locno.

Miscellaneous improvements:
gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF.
New convenience variable $_inferior_thread_count contains the number
of live threads in the current inferior.
New convenience variables $_hit_bpnum and $_hit_locno, set to the
breakpoint number and the breakpoint location number of the breakpoint
last hit.
The "info breakpoints" now displays enabled breakpoint locations
of disabled breakpoints as in the "y-" state.
The format of 'disassemble /r' and 'record instruction-history /r'
has changed to match the layout of GNU objdump when disassembling.

A new format "/b" has been introduce to provide the old behavior of "/r".
The TUI no longer styles the source and assembly code highlighted
by the current position indicator by default. You can however
re-enable styling using the new "set style tui-current-position"
command.
It is now possible to use the "document" command to document
user-defined commands.
Support for memory tag data for AArch64 MTE.
Support Removal notices:
DBX mode has been removed.
Support for building against Python version 2 has been removed. It
is now only possible to build GDB against Python 3.
Support for the following commands has been removed:

set debug aix-solib on|off
show debug aix-solib
set debug solib-frv on|off
show debug solib-frv

Use the "set/show debug solib" commands instead.
See the NEWS file for a more complete and detailed list of what
this release includes.

Dec 18th, 2022: GDB 13 branch created
The GDB 13 branch (gdb-13-branch) has been created. To check out
a copy of the branch use:

git clone --branch gdb-13-branch https://sourceware.org/git/binutils-gdb.git
May 1st, 2022: GDB 12.1 Released!
The latest version of GDB, version 12.1, is available for download.

This version of GDB includes the following changes and enhancements:

New support for the following native configuration:
GNU/Linux/OpenRISC or1k*-*-linux*
New support for the following targets:
GNU/Linux/LoongArch loongarch*-*-linux*
New GDBserver support on the following configuration:
GNU/Linux/OpenRISC or1k*-*-linux*
Support for the following target has been removed:
S+core score-*-*
Multithreaded symbol loading is now enabled by default

Deprecation Notices:
GDB 12 is the last release of GDB that will support building against Python 2
DBX mode is deprecated, and will be removed in GDB 13
GDB/MI changes:
The '-add-inferior' with no option flags now inherits the connection
of the current inferior, this restores the behaviour of GDB as it
was prior to GDB 10.
The '-add-inferior' command now accepts a '--no-connection' option,
which causes the new inferior to start without a connection.

Python API enhancements:
It is now possible to add GDB/MI commands implemented in Python
New function gdb.Architecture.integer_type()
New gdb.events.gdb_exiting event
New 'gdb.events.connection_removed' event registry
New gdb.TargetConnection object
New gdb.Inferior.connection property
New read-only attribute gdb.InferiorThread.details
New gdb.RemoteTargetConnection.send_packet method
New read-only attributes gdb.Type.is_scalar and gdb.Type.is_signed
The gdb.Value.format_string method now takes a 'styling' argument
Various new function in the "gdb" module
Miscellaneous:
The FreeBSD native target now supports async mode

Improved C++ template support
Support for disabling source highlighting through GNU of the Pygments
library instead.
The "print" command has been changed so as to print floating-point
values with a base-modifying formats such as "/x" to display the
underlying bytes of the value in the desired base.
The "clone-inferior" command now ensures that the TTY, CMD and ARGS
settings are copied from the original inferior to the new one. All
modifications to the environment variables done using the 'set
environment' or 'unset environment' commands are also copied to
the new inferior.
Various new commands have been introduced
See the NEWS file for a more complete and detailed list of what
this release includes.

Mar 20th, 2022: GDB 12 branch created
The GDB 12 branch (gdb-12-branch) has been created. To check out a copy of the branch use:

git clone --branch gdb-12-branch https://sourceware.org/git/binutils-gdb.git
January 16th, 2022: GDB 11.2 Released!
The latest version of GDB, version 11.2, is available for download.

This is a minor corrective release over GDB 11.1, fixing the following issues:

PR sim/28302 (gdb fails to build with glibc 2.34)
PR build/28318 (std::thread support configure check does not use CXX_DIALECT)
PR gdb/28405 (arm-none-eabi: internal-error: ptid_t
	      remote_target::select_thread_for_ambiguous_stop_reply(const
	      target_waitstatus*): Assertion `first_resumed_thread != nullptr'
	      failed)
PR tui/28483 ([gdb/tui] breakpoint creation not displayed)
PR build/28555 (uclibc compile failure since commit
		4655f8509fd44e6efabefa373650d9982ff37fd6)
PR rust/28637 (Rust characters will be encoded using DW_ATE_UTF)
PR gdb/28758 (GDB 11 doesn't work correctly on binaries with a
              SHT_RELR (.relr.dyn) section)
PR gdb/28785 (Support SHT_RELR (.relr.dyn) section)
See the NEWS file for a more complete and detailed list of what
this release includes.

September 13th, 2021: GDB 11.1 Released!
The latest version of GDB, version 11.1, is available for download.

This version of GDB includes the following changes and enhancements:

Support for ARM Symbian (arm*-*-symbianelf*) has been removed.
Building GDB now requires GMP (The GNU Multiple Precision Arithmetic Library).
New command-line options "--early-init-command" (or "-eix") and
"--early-init-eval-command" (or "-eiex")

GDB/MI Changes:
New --qualified option for the '-break-insert' and '-dprintf-insert' commands.
New --force-condition option for the '-break-insert' and
'-dprintf-insert' commands.
New --force option for the '-break-condition' command.
The '-file-list-exec-source-files' now accepts an optional regular
expression to filter the source files included in the result.
The results from '-file-list-exec-source-files' now include a
'debug-fully-read' field to indicate if the corresponding source's
debugging information has been partially read (false) or has been
fully read (true).

TUI Improvements:
Mouse actions are now supported. The mouse wheel scrolls the
appropriate window.  Key combinations that do not have a specific
action on the focused window are now passed to GDB.

Python enhancements:
Inferior objects now contain a read-only 'connection_num' attribute
that gives the connection number as seen in 'info connections' and
'info inferiors'.
New method gdb.Frame.level() which returns the stack level of the frame object.
New method gdb.PendingFrame.level() which returns the stack level
of the frame object.
When hitting a catchpoint, the Python API will now emit a
gdb.BreakpointEvent rather than a gdb.StopEvent. The gdb.Breakpoint
attached to the event will have type BP_CATCHPOINT.
Python TUI windows can now receive mouse click events. If the Window
object implements the click method, it is called for each mouse
click event in this window.  New setting "python ignore-environment
on|off"; if "on", causes GDB's builtin Python to ignore any
environment variable that would otherwise affect how Python behaves
(needs to be set during "early initialization" (see above).  New
setting "python dont-write-bytecode auto|on|off".

Guile API enhancements:
Improved support for rvalue reference values.
New procedures for obtaining value variants: value-reference-value,
value-rvalue-reference-value and value-const-value.
New "qMemTags" and "QMemTags" remote protocol packets (associated
with Memory Tagging).
GDB will now look for the .gdbinit file in a config directory before
looking for ~/.gdbinit. The file is searched for in the following
locations: $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit,
$HOME/.gdbinit. On Apple hosts the search order is instead:
$HOME/Library/Preferences/gdb/gdbinit, $HOME/.gdbinit.  The "break
[...] if CONDITION" command no longer returns an error when the
condition is invalid at one or more locations. Instead, if the
condition is valid at one or more locations, the locations where
the condition is not valid are disabled.
The behavior of the "condition" command is changed to match the
new behavior of the "break" command.

Support for general memory tagging functionality (currently limited
to AArch64 MTE)

Core file debugging now supported for x86_64 Cygwin programs.
New "org.gnu.gdb.riscv.vector" feature for RISC-V targets.
GDB now supports fixed point types which are described in DWARF as
base types with a fixed-point encoding. Additionally, support for
the DW_AT_GNU_numerator and DW_AT_GNU_denominator has also been
added.

Miscellaneous:
New "startup-quietly on|off" setting; when "on", behaves the same
as passing the "-silent" option on the command line.
New "print type hex on|off" setting; when 'on', the 'ptype' command
uses hexadecimal notation to print sizes and offsets of struct
members. When 'off', decimal notation is used.
The "inferior" command, when run without argument, prints information
about the current inferior.
The "ptype" command now supports "/x" and "/d", affecting the base
used to print sizes and offsets.
The output of the "info source" has been restructured.
New "style version foreground | background | intensity" commands
to control the styling of the GDB version number.
Various debug and maintenance commands (mostly useful for the GDB
developers) See the NEWS file for a more complete and detailed list
of what this release includes.
@
text
@a88 10
@@findex bfd_fdopenw
@@subsubsection @@code{bfd_fdopenw}
@@strong{Synopsis}
@@example
bfd *bfd_fdopenw (const char *filename, const char *target, int fd);
@@end example
@@strong{Description}@@*
@@code{bfd_fdopenw} is exactly like @@code{bfd_fdopenr} with the exception that
the resulting BFD is suitable for output.

d177 1
a177 1
bool bfd_close (bfd *abfd);
d197 1
a197 1
bool bfd_close_all_done (bfd *);
d231 1
a231 1
bool bfd_make_writable (bfd *abfd);
d246 1
a246 1
bool bfd_make_readable (bfd *abfd);
d268 10
d288 10
d375 1
a375 1
bool separate_debug_file_exists
d390 1
a390 1
bool separate_alt_debug_file_exists
d401 1
a401 1
   (bfd *abfd, const char *dir, bool include_dirs,
d487 1
a487 1
bool bfd_fill_in_gnu_debuglink_section
d540 1
a540 1
bool check_build_id_file (char *name, void *buildid_p);
a576 11
@@findex bfd_set_filename
@@subsubsection @@code{bfd_set_filename}
@@strong{Synopsis}
@@example
const char *bfd_set_filename (bfd *abfd, const char *filename);
@@end example
@@strong{Description}@@*
Set the filename of @@var{abfd}, copying the FILENAME parameter to
bfd_alloc'd memory owned by @@var{abfd}.  Returns a pointer the
newly allocated name, or NULL if the allocation failed.

@


1.1.1.6
log
@Import gdb-15.1, previous was 13.2

ChangeLog:

2024-03-20  Simon Marchi  <simon.marchi@@efficios.com>

	* .pre-commit-config.yaml: Bump black hook to 24.3.0

2024-03-20  Simon Marchi  <simon.marchi@@efficios.com>

	* .pre-commit-config.yaml: New.

2024-03-14  Simon Marchi  <simon.marchi@@efficios.com>

	* Makefile.def: Add configure-gdbserver and all-gdbserver
	dependencies on all-libiconv.
	* Makefile.in: Re-generate.

2024-01-15  Nick Clifton  <nickc@@redhat.com>

	* 2.42 branch point.

2023-11-15  Arsen Arsenović  <arsen@@aarsen.me>

	* intl: Remove directory.  Replaced with out-of-tree GNU
	gettext.
	* .gitignore: Add '/gettext*'.
	* configure.ac (host_libs): Replace intl with gettext.
	(hbaseargs, bbaseargs, baseargs): Split baseargs into
	{h,b}baseargs.
	(skip_barg): New flag.  Skips appending current flag to
	bbaseargs.
	<library exemptions>: Exempt --with-libintl-{type,prefix} from
	target and build machine argument passing.
	* configure: Regenerate.
	* Makefile.def (host_modules): Replace intl module with gettext
	module.
	(configure-ld): Depend on configure-gettext.
	* Makefile.in: Regenerate.
	* src-release.sh: Remove references to the intl/ directory.

2023-07-03  Nick Clifton  <nickc@@redhat.com>

	2.41 Branch Point.

2023-06-26  Nick Clifton  <nickc@@redhat.com>

	* Import these updates to the config scripts

	commit 4ad4bb7c30aca1e705448ba8d51a210bbd47bb52
	Author: Paul Eggert <eggert@@cs.ucla.edu>
	Date:   Fri Jun 23 09:55:10 2023 -0700

		Quote 'like this', not `like this'.

	commit 63acb96f92473ceb5e21d873d7c0aee266b3d6d3
	Author: Paul Eggert <eggert@@cs.ucla.edu>
	Date:   Sat Jan 21 00:15:01 2023 -0600

		Fix config.sub spelling typo for "athlon"

	commit 4ce12a5c9125cedc0d0ba584444a6865396923ec
	Author: Dmitry V. Levin <ldv@@altlinux.org>
	Date:   Sun Jan 1 08:00:00 2023 +0000

		Update copyright years

	commit c397e2c040bce50bcdccb131f90115ba7e8bfc19
	Author: Arsen Arsenovi <arsen@@aarsen.me>
	Date:   Sat Sep 17 23:34:48 2022 +0200

		config.sub: add linux-mlibc targets

	commit 9f9f9b0b13197269848c76e3e057a3ed0680b4bf
	Author: Arsen Arsenovi <arsen@@aarsen.me>
	Date:   Sat Sep 17 23:34:47 2022 +0200

		config.guess: support running on Managarm systems

	commit 87e6687749da7bb2ab158a79fa83721c19ed9246
	Author: Arsen Arsenovi <arsen@@aarsen.me>
	Date:   Sat Sep 17 23:34:46 2022 +0200

		config.sub: add managarm-{mlibc,kernel} targets

	commit 20403c5701973a4cbd7e0b4bbeb627fcd424a0f1
	Author: Xiaotian Wu <wuxiaotian@@loongson.cn>
	Date:   Mon Aug 1 16:05:29 2022 +0800

		Remove loongarchx32

	commit 02ba26b218d3d3db6c56e014655faf463cefa983
	Author: Alexander von Gluck IV <kallisti5@@unixzen.com>
	Date:   Wed May 25 15:43:13 2022 -0500

		config.guess: Update Haiku guesses

	commit f56a7140386d08a531bcfd444d632b28c61a6329
	Author: Bruno Haible <bruno@@clisp.org>
	Date:   Sun May 8 19:08:08 2022 +0200

		config.guess (x86_64:Linux:*:*): Detect 32-bit ABI.

2023-04-20  Nick Clifton  <nickc@@redhat.com>

	* SECURITY.txt: New file.
	* src-release.sh (DEVO_SUPPORT): Add SECURITY.txt.

2022-12-31  Nick Clifton  <nickc@@redhat.com>

	* 2.40 binutils branch created.
@
text
@d1 5
a11 18
@@findex _bfd_new_bfd
@@subsubsection @@code{_bfd_new_bfd}
@@deftypefn {Function} bfd *_bfd_new_bfd (void); 
Return a new BFD.  All BFD's are allocated through this routine.

@@end deftypefn
@@findex _bfd_new_bfd_contained_in
@@subsubsection @@code{_bfd_new_bfd_contained_in}
@@deftypefn {Function} bfd *_bfd_new_bfd_contained_in (bfd *); 
Allocate a new BFD as a member of archive OBFD.

@@end deftypefn
@@findex _bfd_free_cached_info
@@subsubsection @@code{_bfd_free_cached_info}
@@deftypefn {Function} bool _bfd_free_cached_info (bfd *); 
Free objalloc memory.

@@end deftypefn
d14 6
a19 1
@@deftypefn {Function} bfd *bfd_fopen (const char *filename, const char *target, const char *mode, int fd); 
a39 1
@@end deftypefn
d42 5
a46 1
@@deftypefn {Function} bfd *bfd_openr (const char *filename, const char *target); 
a59 1
@@end deftypefn
d62 5
a66 1
@@deftypefn {Function} bfd *bfd_fdopenr (const char *filename, const char *target, int fd); 
a88 1
@@end deftypefn
d91 5
a95 1
@@deftypefn {Function} bfd *bfd_fdopenw (const char *filename, const char *target, int fd); 
a98 1
@@end deftypefn
d101 6
a106 1
@@deftypefn {Function} bfd *bfd_openstreamr (const char * filename, const char * target, void * stream); 
a112 1
@@end deftypefn
d115 18
a132 1
@@deftypefn {Function} bfd *bfd_openr_iovec (const char *filename, const char *target, void *(*open_func) (struct bfd *nbfd, void *open_closure), void *open_closure, file_ptr (*pread_func) (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes, file_ptr offset), int (*close_func) (struct bfd *nbfd, void *stream), int (*stat_func) (struct bfd *abfd, void *stream, struct stat *sb)); 
a166 1
@@end deftypefn
d169 5
a173 1
@@deftypefn {Function} bfd *bfd_openw (const char *filename, const char *target); 
a182 21
@@end deftypefn
@@findex bfd_elf_bfd_from_remote_memory
@@subsubsection @@code{bfd_elf_bfd_from_remote_memory}
@@deftypefn {Function} bfd *bfd_elf_bfd_from_remote_memory (bfd *templ, bfd_vma ehdr_vma, bfd_size_type size, bfd_vma *loadbasep, int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, bfd_size_type len)); 
Create a new BFD as if by bfd_openr.  Rather than opening a
file, reconstruct an ELF file by reading the segments out of
remote memory based on the ELF file header at EHDR_VMA and the
ELF program headers it points to.  If non-zero, SIZE is the
known extent of the object.  If not null, *LOADBASEP is filled
in with the difference between the VMAs from which the
segments were read, and the VMAs the file headers (and hence
BFD's idea of each section's VMA) put them at.

The function TARGET_READ_MEMORY is called to copy LEN bytes
from the remote memory at target address VMA into the local
buffer at MYADDR; it should return zero on success or an
errno code on failure.  TEMPL must be a BFD for an ELF
target with the word size and byte order found in the remote
memory.

@@end deftypefn
d185 5
a189 1
@@deftypefn {Function} bool bfd_close (bfd *abfd); 
d200 1
a202 1
@@end deftypefn
d205 5
a209 1
@@deftypefn {Function} bool bfd_close_all_done (bfd *); 
d220 1
a222 1
@@end deftypefn
d225 5
a229 1
@@deftypefn {Function} bfd *bfd_create (const char *filename, bfd *templ); 
a236 1
@@end deftypefn
d239 5
a243 1
@@deftypefn {Function} bool bfd_make_writable (bfd *abfd); 
d249 1
a251 1
@@end deftypefn
d254 5
a258 1
@@deftypefn {Function} bool bfd_make_readable (bfd *abfd); 
d265 1
d268 20
a287 1
@@end deftypefn
d290 6
a295 1
@@deftypefn {Function} uint32_t bfd_calc_gnu_debuglink_crc32 (uint32_t crc, const bfd_byte *buf, bfd_size_type len); 
d300 1
d303 23
a325 1
@@end deftypefn
d328 5
a332 1
@@deftypefn {Function} char *bfd_get_debug_link_info (bfd *abfd, uint32_t *crc32_out); 
d336 5
a340 4
Returns the filename of the associated debug information file,
or NULL if there is no such file.  If the filename was found
then the contents of @@var{crc32_out} are updated to hold the
corresponding CRC32 value for the file.
a344 1
@@end deftypefn
d347 7
a353 1
@@deftypefn {Function} char *bfd_get_alt_debug_link_info (bfd * abfd, bfd_size_type *buildid_len, bfd_byte **buildid_out); 
d361 52
a412 1
@@end deftypefn
d415 5
a419 1
@@deftypefn {Function} char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir); 
d430 4
a433 4
Returns @@code{NULL} on any errors or failure to locate the .debug
file, otherwise a pointer to a heap-allocated string
containing the filename.  The caller is responsible for
freeing this string.
a434 1
@@end deftypefn
d437 5
a441 1
@@deftypefn {Function} char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir); 
d452 4
a455 4
Returns @@code{NULL} on any errors or failure to locate the debug
file, otherwise a pointer to a heap-allocated string
containing the filename.  The caller is responsible for
freeing this string.
a456 1
@@end deftypefn
d459 6
a464 1
@@deftypefn {Function} struct bfd_section *bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename); 
d469 1
a472 1
@@end deftypefn
d475 6
a480 1
@@deftypefn {Function} bool bfd_fill_in_gnu_debuglink_section (bfd *abfd, struct bfd_section *sect, const char *filename); 
d483 2
a484 2
specified @@var{filename}.  The filename should be absolute or
relative to the current directory.
d486 1
d490 51
a540 1
@@end deftypefn
d543 5
a547 1
@@deftypefn {Function} char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); 
d562 4
a565 4
Returns @@code{NULL} on any errors or failure to locate the debug
file, otherwise a pointer to a heap-allocated string
containing the filename.  The caller is responsible for
freeing this string.
a566 1
@@end deftypefn
d569 5
a573 1
@@deftypefn {Function} const char *bfd_set_filename (bfd *abfd, const char *filename); 
a577 1
@@end deftypefn
@


1.1.1.7
log
@Import gdb-17.1, previous was 16.3

This version of GDB includes the following changes and enhancements:

* x86-64 CET shadow stack support
* Debugging Linux programs that use AArch64 Guarded Control Stacks
* GDB record feature now supports rv64gc architectures
* 'info threads' command support for two new options '-stopped' and
  '-running' to limit the list of displayed threads.
* On Linux and FreeBSD, the addresses shown by the 'info
  sharedlibrary' command are now for the full memory range
  allocated to the shared library.
* Linux checkpoints now work with multiple inferiors
* Improved linker namespace support
* Warnings and error messages now start with an emoji (warning
  sign, or cross mark) if supported by the host charset.
  Configurable.
* Built-in support for TLS on Linux as backup when libthread_db is
  not available. Supported on the x86_64, aarch64, ppc64, s390x,
  and riscv architectures, when compiled with GLIBC or MUSL.
* New command "set riscv numeric-register-names" to display
  risc-v registers using their numeric names instead of their
  ABI names.
* The Alpha target now supports target descriptions.

Python API enhancements:
* New class gdb.Color for dealing with colors, and new constant
  gdb.PARAM_COLOR
* New gdb.ParameterPrefix class, to create new 'set/show' command
  prefixes.
* New attribute gdb.Value.is_unavailable, this checks for
  unavailability like gdb.Value.is_optimized_out checks for
  optimized out values.
* New gdb.warning() function to print a warning message, with
  GDB's standard 'warning' prefix (see emoji support entry below)
* gdb.execute has an additional 'styling' argument.
* Prefix commands (gdb.Command sub-classes) that don't have an
  invoke method now behave like builtin prefix commands when
  invoked without a sub-command name.
* Setting the documentation string (__doc__) of a gdb.Parameter
  sub-class to the empty string, means GDB will only display the
  set_doc or show_doc strings in the set/show help output.

Guile API enhancements:
* New type for dealing with colors and constant PARAM_COLOR
* Prefix commands (using make-command) that don't have a #:invoke
  property will now behave like builtin prefix commands when
  invoked without a sub-command name.
* Eliding the #:doc string from make-parameter now means that
  GDB will use a default documentation string.
* Setting #:doc to the empty string for make-parameter means GDB
  will only display the #:set_doc or #:show_doc strings in the
  set/show help output.

Debugger Adapter Protocol changes:
* GDB now supports the "completions" request.
* New "--binary-output" command line option to disable LF
  translations (Windows only)

New convenience variables:
* $_colorsupport providing a comma-separated list of color space
  names supported by the terminal.
* $linker_namespace_count and $_linker_namespace provide the list
  of active linker namespaces.

Remote package additions and changes:
* New 'binary-upload+' value in qSupported reply
* The 'vFile:stat' command implementation has been corrected to
  use stat rather than lstat.
* New vFile:lstat packet, useful for handling symbolic links
* Support for the "id_str" attribute in 'qXfer:threads:read' XML
  answer.

GDB/MI changes:
* The =library-unloaded event now includes the 'ranges' field and
  the 'still-in-use' field.

Configure changes:
* Ability to select which file formats to include support for
* New option --disable-gdb-compile to disable support for the
  compile subsystem.
* New option --disable-gdb-dwarf-support to disable support for
  DWARF debug information in GDB.
* New option --disable-gdb-mdebug-support to disable support for
  mdebug/ecoff debug information.

Incompatible changes:
* Support for Python versions older than 3.4 has been removed
* Support for stabs debugging format and the a.out/dbx object
  format is deprecated, and will be removed in GDB 18.
* UST (static tracepoint) gdbserver support has been removed
@
text
@a373 7
@@findex bfd_extract_object_only_section
@@subsubsection @@code{bfd_extract_object_only_section}
@@deftypefn {Function} const char *bfd_extract_object_only_section (bfd *abfd); 
Takes a @@var{ABFD} and extract the .gnu_object_only section into
a temporary file.

@@end deftypefn
@


