From 0c3d4888d9686c7d740e6258a3b3f35440aa45ca Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Mon, 14 Jan 2008 21:36:39 +0000 Subject: [PATCH] Switch to gdb-6.7.1 --- gnu/usr.bin/gdb/Makefile | 4 +- gnu/usr.bin/gdb/Makefile.inc | 4 +- gnu/usr.bin/gdb/gdb/doc/Makefile | 10 +- gnu/usr.bin/gdb/gdb/doc/inc-hist.texinfo | 439 ------ gnu/usr.bin/gdb/gdb/doc/rluser.texinfo | 1797 ---------------------- gnu/usr.bin/gdb/gdbtui/Makefile | 21 + gnu/usr.bin/gdb/kgdb/kgdb.c | 6 +- gnu/usr.bin/gdb/kgdb/kgdb.h | 6 +- gnu/usr.bin/gdb/kgdb/kthr.c | 4 +- gnu/usr.bin/gdb/kgdb/trgt.c | 26 +- gnu/usr.bin/gdb/kgdb/trgt_i386.c | 60 +- gnu/usr.bin/gdb/libbfd/Makefile | 12 +- gnu/usr.bin/gdb/libbfd/Makefile.i386 | 8 +- gnu/usr.bin/gdb/libbfd/bfd.h | 1251 ++++++++++++--- gnu/usr.bin/gdb/libbfd/bfdver.h | 9 +- gnu/usr.bin/gdb/libbfd/config.h | 385 ++--- gnu/usr.bin/gdb/libgdb/Makefile | 179 ++- gnu/usr.bin/gdb/libgdb/Makefile.amd64 | 12 +- gnu/usr.bin/gdb/libgdb/Makefile.i386 | 11 +- gnu/usr.bin/gdb/libgdb/config.h | 781 +++++----- gnu/usr.bin/gdb/libgdb/nm-dragonfly.h | 125 -- gnu/usr.bin/gdb/libgdb/version.c | 8 +- gnu/usr.bin/gdb/libiberty/Makefile | 5 +- gnu/usr.bin/gdb/libiberty/config.h | 82 +- gnu/usr.bin/gdb/libopcodes/config.h | 166 +- 25 files changed, 2051 insertions(+), 3360 deletions(-) delete mode 100644 gnu/usr.bin/gdb/gdb/doc/inc-hist.texinfo delete mode 100644 gnu/usr.bin/gdb/gdb/doc/rluser.texinfo create mode 100644 gnu/usr.bin/gdb/gdbtui/Makefile delete mode 100644 gnu/usr.bin/gdb/libgdb/nm-dragonfly.h diff --git a/gnu/usr.bin/gdb/Makefile b/gnu/usr.bin/gdb/Makefile index 741478abbe..4a2828681b 100644 --- a/gnu/usr.bin/gdb/Makefile +++ b/gnu/usr.bin/gdb/Makefile @@ -1,5 +1,5 @@ -# $DragonFly: src/gnu/usr.bin/gdb/Makefile,v 1.2 2006/03/07 15:48:11 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/Makefile,v 1.3 2008/01/14 21:36:38 corecode Exp $ -SUBDIR= libbfd libiberty libopcodes libgdb gdb kgdb +SUBDIR= libbfd libiberty libopcodes libgdb gdb kgdb gdbtui .include diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc index 2fee67e404..494df1a6ec 100644 --- a/gnu/usr.bin/gdb/Makefile.inc +++ b/gnu/usr.bin/gdb/Makefile.inc @@ -1,6 +1,6 @@ -# $DragonFly: src/gnu/usr.bin/gdb/Makefile.inc,v 1.3 2006/03/07 15:48:11 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/Makefile.inc,v 1.4 2008/01/14 21:36:38 corecode Exp $ -BASEDIR= ${.CURDIR}/${RELATIVE}../../../../contrib/gdb-6.2.1 +BASEDIR= ${.CURDIR}/${RELATIVE}../../../../contrib/gdb-6 GDBLIBS+= ${.OBJDIR}/../libopcodes/libopcodes.a GDBLIBS+= ${.OBJDIR}/../libgdb/libgdb.a diff --git a/gnu/usr.bin/gdb/gdb/doc/Makefile b/gnu/usr.bin/gdb/gdb/doc/Makefile index 361f503edd..29356328d3 100644 --- a/gnu/usr.bin/gdb/gdb/doc/Makefile +++ b/gnu/usr.bin/gdb/gdb/doc/Makefile @@ -1,14 +1,14 @@ -# $DragonFly: src/gnu/usr.bin/gdb/gdb/doc/Makefile,v 1.1 2004/10/24 19:05:39 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/gdb/doc/Makefile,v 1.2 2008/01/14 21:36:38 corecode Exp $ RELATIVE= ../ .include "../../Makefile.inc" SRCDIR= ${BASEDIR}/gdb/doc -RLUSER= ${.CURDIR}/../../../../../contrib/readline-5.0/doc/rluser.texi -HSUSER= ${.CURDIR}/../../../../../contrib/readline-5.0/doc/hsuser.texi +READLINEDIR= ${BASEDIR}/readline/doc -.PATH: ${SRCDIR} +.PATH: ${SRCDIR} ${READLINEDIR} +MAKEINFOFLAGS+= -I ${READLINEDIR} INFO= gdb gdbint stabs annotate @@ -20,7 +20,7 @@ INFOENTRY_annotate= "* GDB annotation. Annotations for the GNU debugger (GDB). CLEANFILES= gdb-cfg.texi -gdb.info: gdb.texinfo fdl.texi gpl.texi agentexpr.texi gdb-cfg.texi GDBvn.texi rluser.texinfo inc-hist.texinfo +gdb.info: gdb.texinfo fdl.texi gpl.texi agentexpr.texi gdb-cfg.texi GDBvn.texi rluser.texi inc-hist.texinfo gdb-cfg.texi: ${SRCDIR}/all-cfg.texi cp ${SRCDIR}/all-cfg.texi ${.TARGET} diff --git a/gnu/usr.bin/gdb/gdb/doc/inc-hist.texinfo b/gnu/usr.bin/gdb/gdb/doc/inc-hist.texinfo deleted file mode 100644 index 64f66d518c..0000000000 --- a/gnu/usr.bin/gdb/gdb/doc/inc-hist.texinfo +++ /dev/null @@ -1,439 +0,0 @@ -@comment $DragonFly: src/gnu/usr.bin/gdb/gdb/doc/Attic/inc-hist.texinfo,v 1.1 2004/10/24 19:05:39 joerg Exp $ -@ignore -This file documents the user interface to the GNU History library. - -Copyright (C) 1988-1999 Free Software Foundation, Inc. -Authored by Brian Fox and Chet Ramey. - -Permission is granted to make and distribute verbatim copies of this manual -provided the copyright notice and this permission notice are preserved on -all copies. - -Permission is granted to process this file through Tex and print the -results, provided the printed document carries copying permission notice -identical to this one except for the removal of this paragraph (this -paragraph not being relevant to the printed manual). - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that the -GNU Copyright statement is available to the distributee, and provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. -@end ignore - -@node Using History Interactively -@chapter Using History Interactively - -@c @ifclear BashFeatures -@c @defcodeindex bt -@c @end ifclear - -@ifset BashFeatures -This chapter describes how to use the @sc{gnu} History Library -interactively, from a user's standpoint. -It should be considered a user's guide. -For information on using the @sc{gnu} History Library in other programs, -see the @sc{gnu} Readline Library Manual. -@end ifset -@ifclear BashFeatures -This chapter describes how to use the GNU History Library interactively, -from a user's standpoint. It should be considered a user's guide. -@c For -@c information on using the GNU History Library in your own programs, -@c @pxref{Programming with GNU History}. -@end ifclear - -@ifset BashFeatures -@menu -* Bash History Facilities:: How Bash lets you manipulate your command - history. -* Bash History Builtins:: The Bash builtin commands that manipulate - the command history. -* History Interaction:: What it feels like using History as a user. -@end menu -@end ifset -@ifclear BashFeatures -@menu -* History Interaction:: What it feels like using History as a user. -@end menu -@end ifclear - -@ifset BashFeatures -@node Bash History Facilities -@section Bash History Facilities -@cindex command history -@cindex history list - -When the @samp{-o history} option to the @code{set} builtin -is enabled (@pxref{The Set Builtin}), -the shell provides access to the @var{command history}, -the list of commands previously typed. -The value of the @code{HISTSIZE} shell variable is used as the -number of commands to save in a history list. -The text of the last @code{$HISTSIZE} -commands (default 500) is saved. -The shell stores each command in the history list prior to -parameter and variable expansion -but after history expansion is performed, subject to the -values of the shell variables -@code{HISTIGNORE} and @code{HISTCONTROL}. - -When the shell starts up, the history is initialized from the -file named by the @code{HISTFILE} variable (default @file{~/.bash_history}). -The file named by the value of @code{HISTFILE} is truncated, if -necessary, to contain no more than the number of lines specified by -the value of the @code{HISTFILESIZE} variable. -When an interactive shell exits, the last -@code{$HISTSIZE} lines are copied from the history list to the file -named by @code{$HISTFILE}. -If the @code{histappend} shell option is set (@pxref{Bash Builtins}), -the lines are appended to the history file, -otherwise the history file is overwritten. -If @code{HISTFILE} -is unset, or if the history file is unwritable, the history is -not saved. After saving the history, the history file is truncated -to contain no more than @code{$HISTFILESIZE} -lines. If @code{HISTFILESIZE} is not set, no truncation is performed. - -The builtin command @code{fc} may be used to list or edit and re-execute -a portion of the history list. -The @code{history} builtin may be used to display or modify the history -list and manipulate the history file. -When using command-line editing, search commands -are available in each editing mode that provide access to the -history list (@pxref{Commands For History}). - -The shell allows control over which commands are saved on the history -list. The @code{HISTCONTROL} and @code{HISTIGNORE} -variables may be set to cause the shell to save only a subset of the -commands entered. -The @code{cmdhist} -shell option, if enabled, causes the shell to attempt to save each -line of a multi-line command in the same history entry, adding -semicolons where necessary to preserve syntactic correctness. -The @code{lithist} -shell option causes the shell to save the command with embedded newlines -instead of semicolons. -The @code{shopt} builtin is used to set these options. -@xref{Bash Builtins}, for a description of @code{shopt}. - -@node Bash History Builtins -@section Bash History Builtins -@cindex history builtins - -Bash provides two builtin commands which manipulate the -history list and history file. - -@table @code - -@item fc -@btindex fc -@example -@code{fc [-e @var{ename}] [-nlr] [@var{first}] [@var{last}]} -@code{fc -s [@var{pat}=@var{rep}] [@var{command}]} -@end example - -Fix Command. In the first form, a range of commands from @var{first} to -@var{last} is selected from the history list. Both @var{first} and -@var{last} may be specified as a string (to locate the most recent -command beginning with that string) or as a number (an index into the -history list, where a negative number is used as an offset from the -current command number). If @var{last} is not specified it is set to -@var{first}. If @var{first} is not specified it is set to the previous -command for editing and @minus{}16 for listing. If the @samp{-l} flag is -given, the commands are listed on standard output. The @samp{-n} flag -suppresses the command numbers when listing. The @samp{-r} flag -reverses the order of the listing. Otherwise, the editor given by -@var{ename} is invoked on a file containing those commands. If -@var{ename} is not given, the value of the following variable expansion -is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the -value of the @code{FCEDIT} variable if set, or the value of the -@code{EDITOR} variable if that is set, or @code{vi} if neither is set. -When editing is complete, the edited commands are echoed and executed. - -In the second form, @var{command} is re-executed after each instance -of @var{pat} in the selected command is replaced by @var{rep}. - -A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so -that typing @samp{r cc} runs the last command beginning with @code{cc} -and typing @samp{r} re-executes the last command (@pxref{Aliases}). - -@item history -@btindex history -@example -history [@var{n}] -history -c -history -d @var{offset} -history [-anrw] [@var{filename}] -history -ps @var{arg} -@end example - -With no options, display the history list with line numbers. -Lines prefixed with with a @samp{*} have been modified. -An argument of @var{n} lists only the last @var{n} lines. -Options, if supplied, have the following meanings: - -@table @code -@item -c -Clear the history list. This may be combined -with the other options to replace the history list completely. - -@item -d @var{offset} -Delete the history entry at position @var{offset}. -@var{offset} should be specified as it appears when the history is -displayed. - -@item -a -Append the new -history lines (history lines entered since the beginning of the -current Bash session) to the history file. - -@item -n -Append the history lines not already read from the history file -to the current history list. These are lines appended to the history -file since the beginning of the current Bash session. - -@item -r -Read the current history file and append its contents to -the history list. - -@item -w -Write out the current history to the history file. - -@item -p -Perform history substitution on the @var{arg}s and display the result -on the standard output, without storing the results in the history list. - -@item -s -The @var{arg}s are added to the end of -the history list as a single entry. - -@end table - -When any of the @samp{-w}, @samp{-r}, @samp{-a}, or @samp{-n} options is -used, if @var{filename} -is given, then it is used as the history file. If not, then -the value of the @code{HISTFILE} variable is used. - -@end table -@end ifset - -@node History Interaction -@section History Expansion -@cindex history expansion - -The History library provides a history expansion feature that is similar -to the history expansion provided by @code{csh}. This section -describes the syntax used to manipulate the history information. - -History expansions introduce words from the history list into -the input stream, making it easy to repeat commands, insert the -arguments to a previous command into the current input line, or -fix errors in previous commands quickly. - -History expansion takes place in two parts. The first is to determine -which line from the history list should be used during substitution. -The second is to select portions of that line for inclusion into the -current one. The line selected from the history is called the -@dfn{event}, and the portions of that line that are acted upon are -called @dfn{words}. Various @dfn{modifiers} are available to manipulate -the selected words. The line is broken into words in the same fashion -that Bash does, so that several words -surrounded by quotes are considered one word. -History expansions are introduced by the appearance of the -history expansion character, which is @samp{!} by default. -@ifset BashFeatures -Only @samp{\} and @samp{'} may be used to escape the history expansion -character. -@end ifset - -@ifset BashFeatures -Several shell options settable with the @code{shopt} -builtin (@pxref{Bash Builtins}) may be used to tailor -the behavior of history expansion. If the -@code{histverify} shell option is enabled, and Readline -is being used, history substitutions are not immediately passed to -the shell parser. -Instead, the expanded line is reloaded into the Readline -editing buffer for further modification. -If Readline is being used, and the @code{histreedit} -shell option is enabled, a failed history expansion will be -reloaded into the Readline editing buffer for correction. -The @samp{-p} option to the @code{history} builtin command -may be used to see what a history expansion will do before using it. -The @samp{-s} option to the @code{history} builtin may be used to -add commands to the end of the history list without actually executing -them, so that they are available for subsequent recall. -This is most useful in conjunction with Readline. - -The shell allows control of the various characters used by the -history expansion mechanism with the @code{histchars} variable. -@end ifset - -@menu -* Event Designators:: How to specify which history line to use. -* Word Designators:: Specifying which words are of interest. -* Modifiers:: Modifying the results of substitution. -@end menu - -@node Event Designators -@subsection Event Designators -@cindex event designators - -An event designator is a reference to a command line entry in the -history list. -@cindex history events - -@table @asis - -@item @code{!} -Start a history substitution, except when followed by a space, tab, -the end of the line, @samp{=} or @samp{(}. - -@item @code{!@var{n}} -Refer to command line @var{n}. - -@item @code{!-@var{n}} -Refer to the command @var{n} lines back. - -@item @code{!!} -Refer to the previous command. This is a synonym for @samp{!-1}. - -@item @code{!@var{string}} -Refer to the most recent command starting with @var{string}. - -@item @code{!?@var{string}[?]} -Refer to the most recent command containing @var{string}. The trailing -@samp{?} may be omitted if the @var{string} is followed immediately by -a newline. - -@item @code{^@var{string1}^@var{string2}^} -Quick Substitution. Repeat the last command, replacing @var{string1} -with @var{string2}. Equivalent to -@code{!!:s/@var{string1}/@var{string2}/}. - -@item @code{!#} -The entire command line typed so far. - -@end table - -@node Word Designators -@subsection Word Designators - -Word designators are used to select desired words from the event. -A @samp{:} separates the event specification from the word designator. It -may be omitted if the word designator begins with a @samp{^}, @samp{$}, -@samp{*}, @samp{-}, or @samp{%}. Words are numbered from the beginning -of the line, with the first word being denoted by 0 (zero). Words are -inserted into the current line separated by single spaces. - -@need 0.75 -For example, - -@table @code -@item !! -designates the preceding command. When you type this, the preceding -command is repeated in toto. - -@item !!:$ -designates the last argument of the preceding command. This may be -shortened to @code{!$}. - -@item !fi:2 -designates the second argument of the most recent command starting with -the letters @code{fi}. -@end table - -@need 0.75 -Here are the word designators: - -@table @code - -@item 0 (zero) -The @code{0}th word. For many applications, this is the command word. - -@item @var{n} -The @var{n}th word. - -@item ^ -The first argument; that is, word 1. - -@item $ -The last argument. - -@item % -The word matched by the most recent @samp{?@var{string}?} search. - -@item @var{x}-@var{y} -A range of words; @samp{-@var{y}} abbreviates @samp{0-@var{y}}. - -@item * -All of the words, except the @code{0}th. This is a synonym for @samp{1-$}. -It is not an error to use @samp{*} if there is just one word in the event; -the empty string is returned in that case. - -@item @var{x}* -Abbreviates @samp{@var{x}-$} - -@item @var{x}- -Abbreviates @samp{@var{x}-$} like @samp{@var{x}*}, but omits the last word. - -@end table - -If a word designator is supplied without an event specification, the -previous command is used as the event. - -@node Modifiers -@subsection Modifiers - -After the optional word designator, you can add a sequence of one or more -of the following modifiers, each preceded by a @samp{:}. - -@table @code - -@item h -Remove a trailing pathname component, leaving only the head. - -@item t -Remove all leading pathname components, leaving the tail. - -@item r -Remove a trailing suffix of the form @samp{.@var{suffix}}, leaving -the basename. - -@item e -Remove all but the trailing suffix. - -@item p -Print the new command but do not execute it. - -@ifset BashFeatures -@item q -Quote the substituted words, escaping further substitutions. - -@item x -Quote the substituted words as with @samp{q}, -but break into words at spaces, tabs, and newlines. -@end ifset - -@item s/@var{old}/@var{new}/ -Substitute @var{new} for the first occurrence of @var{old} in the -event line. Any delimiter may be used in place of @samp{/}. -The delimiter may be quoted in @var{old} and @var{new} -with a single backslash. If @samp{&} appears in @var{new}, -it is replaced by @var{old}. A single backslash will quote -the @samp{&}. The final delimiter is optional if it is the last -character on the input line. - -@item & -Repeat the previous substitution. - -@item g -Cause changes to be applied over the entire event line. Used in -conjunction with @samp{s}, as in @code{gs/@var{old}/@var{new}/}, -or with @samp{&}. - -@end table diff --git a/gnu/usr.bin/gdb/gdb/doc/rluser.texinfo b/gnu/usr.bin/gdb/gdb/doc/rluser.texinfo deleted file mode 100644 index 65165b4203..0000000000 --- a/gnu/usr.bin/gdb/gdb/doc/rluser.texinfo +++ /dev/null @@ -1,1797 +0,0 @@ -@comment $DragonFly: src/gnu/usr.bin/gdb/gdb/doc/Attic/rluser.texinfo,v 1.1 2004/10/24 19:05:39 joerg Exp $ -@comment %**start of header (This is for running Texinfo on a region.) -@setfilename rluser.info -@comment %**end of header (This is for running Texinfo on a region.) -@setchapternewpage odd - -@ignore -This file documents the end user interface to the GNU command line -editing features. It is to be an appendix to manuals for programs which -use these features. There is a document entitled "readline.texinfo" -which contains both end-user and programmer documentation for the -GNU Readline Library. - -Copyright (C) 1988-2002 Free Software Foundation, Inc. - -Authored by Brian Fox and Chet Ramey. - -Permission is granted to process this file through Tex and print the -results, provided the printed document carries copying permission notice -identical to this one except for the removal of this paragraph (this -paragraph not being relevant to the printed manual). - -Permission is granted to make and distribute verbatim copies of this manual -provided the copyright notice and this permission notice are preserved on -all copies. - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that the -GNU Copyright statement is available to the distributee, and provided that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. -@end ignore - -@comment If you are including this manual as an appendix, then set the -@comment variable readline-appendix. - -@ifclear BashFeatures -@defcodeindex bt -@end ifclear - -@node Command Line Editing -@chapter Command Line Editing - -This chapter describes the basic features of the @sc{gnu} -command line editing interface. -@ifset BashFeatures -Command line editing is provided by the Readline library, which is -used by several different programs, including Bash. -@end ifset - -@menu -* Introduction and Notation:: Notation used in this text. -* Readline Interaction:: The minimum set of commands for editing a line. -* Readline Init File:: Customizing Readline from a user's view. -* Bindable Readline Commands:: A description of most of the Readline commands - available for binding -* Readline vi Mode:: A short description of how to make Readline - behave like the vi editor. -@ifset BashFeatures -* Programmable Completion:: How to specify the possible completions for - a specific command. -* Programmable Completion Builtins:: Builtin commands to specify how to - complete arguments for a particular command. -@end ifset -@end menu - -@node Introduction and Notation -@section Introduction to Line Editing - -The following paragraphs describe the notation used to represent -keystrokes. - -The text @kbd{C-k} is read as `Control-K' and describes the character -produced when the @key{k} key is pressed while the Control key -is depressed. - -The text @kbd{M-k} is read as `Meta-K' and describes the character -produced when the Meta key (if you have one) is depressed, and the @key{k} -key is pressed. -The Meta key is labeled @key{ALT} on many keyboards. -On keyboards with two keys labeled @key{ALT} (usually to either side of -the space bar), the @key{ALT} on the left side is generally set to -work as a Meta key. -The @key{ALT} key on the right may also be configured to work as a -Meta key or may be configured as some other modifier, such as a -Compose key for typing accented characters. - -If you do not have a Meta or @key{ALT} key, or another key working as -a Meta key, the identical keystroke can be generated by typing @key{ESC} -@emph{first}, and then typing @key{k}. -Either process is known as @dfn{metafying} the @key{k} key. - -The text @kbd{M-C-k} is read as `Meta-Control-k' and describes the -character produced by @dfn{metafying} @kbd{C-k}. - -In addition, several keys have their own names. Specifically, -@key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all -stand for themselves when seen in this text, or in an init file -(@pxref{Readline Init File}). -If your keyboard lacks a @key{LFD} key, typing @key{C-j} will -produce the desired character. -The @key{RET} key may be labeled @key{Return} or @key{Enter} on -some keyboards. - -@node Readline Interaction -@section Readline Interaction -@cindex interaction, readline - -Often during an interactive session you type in a long line of text, -only to notice that the first word on the line is misspelled. The -Readline library gives you a set of commands for manipulating the text -as you type it in, allowing you to just fix your typo, and not forcing -you to retype the majority of the line. Using these editing commands, -you move the cursor to the place that needs correction, and delete or -insert the text of the corrections. Then, when you are satisfied with -the line, you simply press @key{RET}. You do not have to be at the -end of the line to press @key{RET}; the entire line is accepted -regardless of the location of the cursor within the line. - -@menu -* Readline Bare Essentials:: The least you need to know about Readline. -* Readline Movement Commands:: Moving about the input line. -* Readline Killing Commands:: How to delete text, and how to get it back! -* Readline Arguments:: Giving numeric arguments to commands. -* Searching:: Searching through previous lines. -@end menu - -@node Readline Bare Essentials -@subsection Readline Bare Essentials -@cindex notation, readline -@cindex command editing -@cindex editing command lines - -In order to enter characters into the line, simply type them. The typed -character appears where the cursor was, and then the cursor moves one -space to the right. If you mistype a character, you can use your -erase character to back up and delete the mistyped character. - -Sometimes you may mistype a character, and -not notice the error until you have typed several other characters. In -that case, you can type @kbd{C-b} to move the cursor to the left, and then -correct your mistake. Afterwards, you can move the cursor to the right -with @kbd{C-f}. - -When you add text in the middle of a line, you will notice that characters -to the right of the cursor are `pushed over' to make room for the text -that you have inserted. Likewise, when you delete text behind the cursor, -characters to the right of the cursor are `pulled back' to fill in the -blank space created by the removal of the text. A list of the bare -essentials for editing the text of an input line follows. - -@table @asis -@item @kbd{C-b} -Move back one character. -@item @kbd{C-f} -Move forward one character. -@item @key{DEL} or @key{Backspace} -Delete the character to the left of the cursor. -@item @kbd{C-d} -Delete the character underneath the cursor. -@item @w{Printing characters} -Insert the character into the line at the cursor. -@item @kbd{C-_} or @kbd{C-x C-u} -Undo the last editing command. You can undo all the way back to an -empty line. -@end table - -@noindent -(Depending on your configuration, the @key{Backspace} key be set to -delete the character to the left of the cursor and the @key{DEL} key set -to delete the character underneath the cursor, like @kbd{C-d}, rather -than the character to the left of the cursor.) - -@node Readline Movement Commands -@subsection Readline Movement Commands - - -The above table describes the most basic keystrokes that you need -in order to do editing of the input line. For your convenience, many -other commands have been added in addition to @kbd{C-b}, @kbd{C-f}, -@kbd{C-d}, and @key{DEL}. Here are some commands for moving more rapidly -about the line. - -@table @kbd -@item C-a -Move to the start of the line. -@item C-e -Move to the end of the line. -@item M-f -Move forward a word, where a word is composed of letters and digits. -@item M-b -Move backward a word. -@item C-l -Clear the screen, reprinting the current line at the top. -@end table - -Notice how @kbd{C-f} moves forward a character, while @kbd{M-f} moves -forward a word. It is a loose convention that control keystrokes -operate on characters while meta keystrokes operate on words. - -@node Readline Killing Commands -@subsection Readline Killing Commands - -@cindex killing text -@cindex yanking text - -@dfn{Killing} text means to delete the text from the line, but to save -it away for later use, usually by @dfn{yanking} (re-inserting) -it back into the line. -(`Cut' and `paste' are more recent jargon for `kill' and `yank'.) - -If the description for a command says that it `kills' text, then you can -be sure that you can get the text back in a different (or the same) -place later. - -When you use a kill command, the text is saved in a @dfn{kill-ring}. -Any number of consecutive kills save all of the killed text together, so -that when you yank it back, you get it all. The kill -ring is not line specific; the text that you killed on a previously -typed line is available to be yanked back later, when you are typing -another line. -@cindex kill ring - -Here is the list of commands for killing text. - -@table @kbd -@item C-k -Kill the text from the current cursor position to the end of the line. - -@item M-d -Kill from the cursor to the end of the current word, or, if between -words, to the end of the next word. -Word boundaries are the same as those used by @kbd{M-f}. - -@item M-@key{DEL} -Kill from the cursor the start of the current word, or, if between -words, to the start of the previous word. -Word boundaries are the same as those used by @kbd{M-b}. - -@item C-w -Kill from the cursor to the previous whitespace. This is different than -@kbd{M-@key{DEL}} because the word boundaries differ. - -@end table - -Here is how to @dfn{yank} the text back into the line. Yanking -means to copy the most-recently-killed text from the kill buffer. - -@table @kbd -@item C-y -Yank the most recently killed text back into the buffer at the cursor. - -@item M-y -Rotate the kill-ring, and yank the new top. You can only do this if -the prior command is @kbd{C-y} or @kbd{M-y}. -@end table - -@node Readline Arguments -@subsection Readline Arguments - -You can pass numeric arguments to Readline commands. Sometimes the -argument acts as a repeat count, other times it is the @i{sign} of the -argument that is significant. If you pass a negative argument to a -command which normally acts in a forward direction, that command will -act in a backward direction. For example, to kill text back to the -start of the line, you might type @samp{M-- C-k}. - -The general way to pass numeric arguments to a command is to type meta -digits before the command. If the first `digit' typed is a minus -sign (@samp{-}), then the sign of the argument will be negative. Once -you have typed one meta digit to get the argument started, you can type -the remainder of the digits, and then the command. For example, to give -the @kbd{C-d} command an argument of 10, you could type @samp{M-1 0 C-d}, -which will delete the next ten characters on the input line. - -@node Searching -@subsection Searching for Commands in the History - -Readline provides commands for searching through the command history -@ifset BashFeatures -(@pxref{Bash History Facilities}) -@end ifset -for lines containing a specified string. -There are two search modes: @dfn{incremental} and @dfn{non-incremental}. - -Incremental searches begin before the user has finished typing the -search string. -As each character of the search string is typed, Readline displays -the next entry from the history matching the string typed so far. -An incremental search requires only as many characters as needed to -find the desired history entry. -To search backward in the history for a particular string, type -@kbd{C-r}. Typing @kbd{C-s} searches forward through the history. -The characters present in the value of the @code{isearch-terminators} variable -are used to terminate an incremental search. -If that variable has not been assigned a value, the @key{ESC} and -@kbd{C-J} characters will terminate an incremental search. -@kbd{C-g} will abort an incremental search and restore the original line. -When the search is terminated, the history entry containing the -search string becomes the current line. - -To find other matching entries in the history list, type @kbd{C-r} or -@kbd{C-s} as appropriate. -This will search backward or forward in the history for the next -entry matching the search string typed so far. -Any other key sequence bound to a Readline command will terminate -the search and execute that command. -For instance, a @key{RET} will terminate the search and accept -the line, thereby executing the command from the history list. -A movement command will terminate the search, make the last line found -the current line, and begin editing. - -Readline remembers the last incremental search string. If two -@kbd{C-r}s are typed without any intervening characters defining a new -search string, any remembered search string is used. - -Non-incremental searches read the entire search string before starting -to search for matching history lines. The search string may be -typed by the user or be part of the contents of the current line. - -@node Readline Init File -@section Readline Init File -@cindex initialization file, readline - -Although the Readline library comes with a set of Emacs-like -keybindings installed by default, it is possible to use a different set -of keybindings. -Any user can customize programs that use Readline by putting -commands in an @dfn{inputrc} file, conventionally in his home directory. -The name of this -@ifset BashFeatures -file is taken from the value of the shell variable @env{INPUTRC}. If -@end ifset -@ifclear BashFeatures -file is taken from the value of the environment variable @env{INPUTRC}. If -@end ifclear -that variable is unset, the default is @file{~/.inputrc}. - -When a program which uses the Readline library starts up, the -init file is read, and the key bindings are set. - -In addition, the @code{C-x C-r} command re-reads this init file, thus -incorporating any changes that you might have made to it. - -@menu -* Readline Init File Syntax:: Syntax for the commands in the inputrc file. - -* Conditional Init Constructs:: Conditional key bindings in the inputrc file. - -* Sample Init File:: An example inputrc file. -@end menu - -@node Readline Init File Syntax -@subsection Readline Init File Syntax - -There are only a few basic constructs allowed in the -Readline init file. Blank lines are ignored. -Lines beginning with a @samp{#} are comments. -Lines beginning with a @samp{$} indicate conditional -constructs (@pxref{Conditional Init Constructs}). Other lines -denote variable settings and key bindings. - -@table @asis -@item Variable Settings -You can modify the run-time behavior of Readline by -altering the values of variables in Readline -using the @code{set} command within the init file. -The syntax is simple: - -@example -set @var{variable} @var{value} -@end example - -@noindent -Here, for example, is how to -change from the default Emacs-like key binding to use -@code{vi} line editing commands: - -@example -set editing-mode vi -@end example - -Variable names and values, where appropriate, are recognized without regard -to case. - -@ifset BashFeatures -The @w{@code{bind -V}} command lists the current Readline variable names -and values. @xref{Bash Builtins}. -@end ifset - -A great deal of run-time behavior is changeable with the following -variables. - -@cindex variables, readline -@table @code - -@item bell-style -@vindex bell-style -Controls what happens when Readline wants to ring the terminal bell. -If set to @samp{none}, Readline never rings the bell. If set to -@samp{visible}, Readline uses a visible bell if one is available. -If set to @samp{audible} (the default), Readline attempts to ring -the terminal's bell. - -@item comment-begin -@vindex comment-begin -The string to insert at the beginning of the line when the -@code{insert-comment} command is executed. The default value -is @code{"#"}. - -@item completion-ignore-case -If set to @samp{on}, Readline performs filename matching and completion -in a case-insensitive fashion. -The default value is @samp{off}. - -@item completion-query-items -@vindex completion-query-items -The number of possible completions that determines when the user is -asked whether he wants to see the list of possibilities. If the -number of possible completions is greater than this value, -Readline will ask the user whether or not he wishes to view -them; otherwise, they are simply listed. -This variable must be set to an integer value greater than or equal to 0. -The default limit is @code{100}. - -@item convert-meta -@vindex convert-meta -If set to @samp{on}, Readline will convert characters with the -eighth bit set to an @sc{ascii} key sequence by stripping the eighth -bit and prefixing an @key{ESC} character, converting them to a -meta-prefixed key sequence. The default value is @samp{on}. - -@item disable-completion -@vindex disable-completion -If set to @samp{On}, Readline will inhibit word completion. -Completion characters will be inserted into the line as if they had -been mapped to @code{self-insert}. The default is @samp{off}. - -@item editing-mode -@vindex editing-mode -The @code{editing-mode} variable controls which default set of -key bindings is used. By default, Readline starts up in Emacs editing -mode, where the keystrokes are most similar to Emacs. This variable can be -set to either @samp{emacs} or @samp{vi}. - -@item enable-keypad -@vindex enable-keypad -When set to @samp{on}, Readline will try to enable the application -keypad when it is called. Some systems need this to enable the -arrow keys. The default is @samp{off}. - -@item expand-tilde -@vindex expand-tilde -If set to @samp{on}, tilde expansion is performed when Readline -attempts word completion. The default is @samp{off}. - -@vindex history-preserve-point -If set to @samp{on}, the history code attempts to place point at the -same location on each history line retrived with @code{previous-history} -or @code{next-history}. - -@item horizontal-scroll-mode -@vindex horizontal-scroll-mode -This variable can be set to either @samp{on} or @samp{off}. Setting it -to @samp{on} means that the text of the lines being edited will scroll -horizontally on a single screen line when they are longer than the width -of the screen, instead of wrapping onto a new screen line. By default, -this variable is set to @samp{off}. - -@item input-meta -@vindex input-meta -@vindex meta-flag -If set to @samp{on}, Readline will enable eight-bit input (it -will not clear the eighth bit in the characters it reads), -regardless of what the terminal claims it can support. The -default value is @samp{off}. The name @code{meta-flag} is a -synonym for this variable. - -@item isearch-terminators -@vindex isearch-terminators -The string of characters that should terminate an incremental search without -subsequently executing the character as a command (@pxref{Searching}). -If this variable has not been given a value, the characters @key{ESC} and -@kbd{C-J} will terminate an incremental search. - -@item keymap -@vindex keymap -Sets Readline's idea of the current keymap for key binding commands. -Acceptable @code{keymap} names are -@code{emacs}, -@code{emacs-standard}, -@code{emacs-meta}, -@code{emacs-ctlx}, -@code{vi}, -@code{vi-move}, -@code{vi-command}, and -@code{vi-insert}. -@code{vi} is equivalent to @code{vi-command}; @code{emacs} is -equivalent to @code{emacs-standard}. The default value is @code{emacs}. -The value of the @code{editing-mode} variable also affects the -default keymap. - -@item mark-directories -If set to @samp{on}, completed directory names have a slash -appended. The default is @samp{on}. - -@item mark-modified-lines -@vindex mark-modified-lines -This variable, when set to @samp{on}, causes Readline to display an -asterisk (@samp{*}) at the start of history lines which have been modified. -This variable is @samp{off} by default. - -@item mark-symlinked-directories -@vindex mark-symlinked-directories -If set to @samp{on}, completed names which are symbolic links -to directories have a slash appended (subject to the value of -@code{mark-directories}). -The default is @samp{off}. - -@item match-hidden-files -@vindex match-hidden-files -This variable, when set to @samp{on}, causes Readline to match files whose -names begin with a @samp{.} (hidden files) when performing filename -completion, unless the leading @samp{.} is -supplied by the user in the filename to be completed. -This variable is @samp{on} by default. - -@item output-meta -@vindex output-meta -If set to @samp{on}, Readline will display characters with the -eighth bit set directly rather than as a meta-prefixed escape -sequence. The default is @samp{off}. - -@item page-completions -@vindex page-completions -If set to @samp{on}, Readline uses an internal @code{more}-like pager -to display a screenful of possible completions at a time. -This variable is @samp{on} by default. - -@item print-completions-horizontally -If set to @samp{on}, Readline will display completions with matches -sorted horizontally in alphabetical order, rather than down the screen. -The default is @samp{off}. - -@item show-all-if-ambiguous -@vindex show-all-if-ambiguous -This alters the default behavior of the completion functions. If -set to @samp{on}, -words which have more than one possible completion cause the -matches to be listed immediately instead of ringing the bell. -The default value is @samp{off}. - -@item visible-stats -@vindex visible-stats -If set to @samp{on}, a character denoting a file's type -is appended to the filename when listing possible -completions. The default is @samp{off}. - -@end table - -@item Key Bindings -The syntax for controlling key bindings in the init file is -simple. First you need to find the name of the command that you -want to change. The following sections contain tables of the command -name, the default keybinding, if any, and a short description of what -the command does. - -Once you know the name of the command, simply place on a line -in the init file the name of the key -you wish to bind the command to, a colon, and then the name of the -command. The name of the key -can be expressed in different ways, depending on what you find most -comfortable. - -In addition to command names, readline allows keys to be bound -to a string that is inserted when the key is pressed (a @var{macro}). - -@ifset BashFeatures -The @w{@code{bind -p}} command displays Readline function names and -bindings in a format that can put directly into an initialization file. -@xref{Bash Builtins}. -@end ifset - -@table @asis -@item @w{@var{keyname}: @var{function-name} or @var{macro}} -@var{keyname} is the name of a key spelled out in English. For example: -@example -Control-u: universal-argument -Meta-Rubout: backward-kill-word -Control-o: "> output" -@end example - -In the above example, @kbd{C-u} is bound to the function -@code{universal-argument}, -@kbd{M-DEL} is bound to the function @code{backward-kill-word}, and -@kbd{C-o} is bound to run the macro -expressed on the right hand side (that is, to insert the text -@samp{> output} into the line). - -A number of symbolic character names are recognized while -processing this key binding syntax: -@var{DEL}, -@var{ESC}, -@var{ESCAPE}, -@var{LFD}, -@var{NEWLINE}, -@var{RET}, -@var{RETURN}, -@var{RUBOUT}, -@var{SPACE}, -@var{SPC}, -and -@var{TAB}. - -@item @w{"@var{keyseq}": @var{function-name} or @var{macro}} -@var{keyseq} differs from @var{keyname} above in that strings -denoting an entire key sequence can be specified, by placing -the key sequence in double quotes. Some @sc{gnu} Emacs style key -escapes can be used, as in the following example, but the -special character names are not recognized. - -@example -"\C-u": universal-argument -"\C-x\C-r": re-read-init-file -"\e[11~": "Function Key 1" -@end example - -In the above example, @kbd{C-u} is again bound to the function -@code{universal-argument} (just as it was in the first example), -@samp{@kbd{C-x} @kbd{C-r}} is bound to the function @code{re-read-init-file}, -and @samp{@key{ESC} @key{[} @key{1} @key{1} @key{~}} is bound to insert -the text @samp{Function Key 1}. - -@end table - -The following @sc{gnu} Emacs style escape sequences are available when -specifying key sequences: - -@table @code -@item @kbd{\C-} -control prefix -@item @kbd{\M-} -meta prefix -@item @kbd{\e} -an escape character -@item @kbd{\\} -backslash -@item @kbd{\"} -@key{"}, a double quotation mark -@item @kbd{\'} -@key{'}, a single quote or apostrophe -@end table - -In addition to the @sc{gnu} Emacs style escape sequences, a second -set of backslash escapes is available: - -@table @code -@item \a -alert (bell) -@item \b -backspace -@item \d -delete -@item \f -form feed -@item \n -newline -@item \r -carriage return -@item \t -horizontal tab -@item \v -vertical tab -@item \@var{nnn} -the eight-bit character whose value is the octal value @var{nnn} -(one to three digits) -@item \x@var{HH} -the eight-bit character whose value is the hexadecimal value @var{HH} -(one or two hex digits) -@end table - -When entering the text of a macro, single or double quotes must -be used to indicate a macro definition. -Unquoted text is assumed to be a function name. -In the macro body, the backslash escapes described above are expanded. -Backslash will quote any other character in the macro text, -including @samp{"} and @samp{'}. -For example, the following binding will make @samp{@kbd{C-x} \} -insert a single @samp{\} into the line: -@example -"\C-x\\": "\\" -@end example - -@end table - -@node Conditional Init Constructs -@subsection Conditional Init Constructs - -Readline implements a facility similar in spirit to the conditional -compilation features of the C preprocessor which allows key -bindings and variable settings to be performed as the result -of tests. There are four parser directives used. - -@table @code -@item $if -The @code{$if} construct allows bindings to be made based on the -editing mode, the terminal being used, or the application using -Readline. The text of the test extends to the end of the line; -no characters are required to isolate it. - -@table @code -@item mode -The @code{mode=} form of the @code{$if} directive is used to test -whether Readline is in @code{emacs} or @code{vi} mode. -This may be used in conjunction -with the @samp{set keymap} command, for instance, to set bindings in -the @code{emacs-standard} and @code{emacs-ctlx} keymaps only if -Readline is starting out in @code{emacs} mode. - -@item term -The @code{term=} form may be used to include terminal-specific -key bindings, perhaps to bind the key sequences output by the -terminal's function keys. The word on the right side of the -@samp{=} is tested against both the full name of the terminal and -the portion of the terminal name before the first @samp{-}. This -allows @code{sun} to match both @code{sun} and @code{sun-cmd}, -for instance. - -@item application -The @var{application} construct is used to include -application-specific settings. Each program using the Readline -library sets the @var{application name}, and you can test for -a particular value. -This could be used to bind key sequences to functions useful for -a specific program. For instance, the following command adds a -key sequence that quotes the current or previous word in Bash: -@example -$if Bash -# Quote the current or previous word -"\C-xq": "\eb\"\ef\"" -$endif -@end example -@end table - -@item $endif -This command, as seen in the previous example, terminates an -@code{$if} command. - -@item $else -Commands in this branch of the @code{$if} directive are executed if -the test fails. - -@item $include -This directive takes a single filename as an argument and reads commands -and bindings from that file. -For example, the following directive reads from @file{/etc/inputrc}: -@example -$include /etc/inputrc -@end example -@end table - -@node Sample Init File -@subsection Sample Init File - -Here is an example of an @var{inputrc} file. This illustrates key -binding, variable assignment, and conditional syntax. - -@example -@page -# This file controls the behaviour of line input editing for -# programs that use the GNU Readline library. Existing -# programs include FTP, Bash, and GDB. -# -# You can re-read the inputrc file with C-x C-r. -# Lines beginning with '#' are comments. -# -# First, include any systemwide bindings and variable -# assignments from /etc/Inputrc -$include /etc/Inputrc - -# -# Set various bindings for emacs mode. - -set editing-mode emacs - -$if mode=emacs - -Meta-Control-h: backward-kill-word Text after the function name is ignored - -# -# Arrow keys in keypad mode -# -#"\M-OD": backward-char -#"\M-OC": forward-char -#"\M-OA": previous-history -#"\M-OB": next-history -# -# Arrow keys in ANSI mode -# -"\M-[D": backward-char -"\M-[C": forward-char -"\M-[A": previous-history -"\M-[B": next-history -# -# Arrow keys in 8 bit keypad mode -# -#"\M-\C-OD": backward-char -#"\M-\C-OC": forward-char -#"\M-\C-OA": previous-history -#"\M-\C-OB": next-history -# -# Arrow keys in 8 bit ANSI mode -# -#"\M-\C-[D": backward-char -#"\M-\C-[C": forward-char -#"\M-\C-[A": previous-history -#"\M-\C-[B": next-history - -C-q: quoted-insert - -$endif - -# An old-style binding. This happens to be the default. -TAB: complete - -# Macros that are convenient for shell interaction -$if Bash -# edit the path -"\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f" -# prepare to type a quoted word -- -# insert open and close double quotes -# and move to just after the open quote -"\C-x\"": "\"\"\C-b" -# insert a backslash (testing backslash escapes -# in sequences and macros) -"\C-x\\": "\\" -# Quote the current or previous word -"\C-xq": "\eb\"\ef\"" -# Add a binding to refresh the line, which is unbound -"\C-xr": redraw-current-line -# Edit variable on current line. -"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y=" -$endif - -# use a visible bell if one is available -set bell-style visible - -# don't strip characters to 7 bits when reading -set input-meta on - -# allow iso-latin1 characters to be inserted rather -# than converted to prefix-meta sequences -set convert-meta off - -# display characters with the eighth bit set directly -# rather than as meta-prefixed characters -set output-meta on - -# if there are more than 150 possible completions for -# a word, ask the user if he wants to see all of them -set completion-query-items 150 - -# For FTP -$if Ftp -"\C-xg": "get \M-?" -"\C-xt": "put \M-?" -"\M-.": yank-last-arg -$endif -@end example - -@node Bindable Readline Commands -@section Bindable Readline Commands - -@menu -* Commands For Moving:: Moving about the line. -* Commands For History:: Getting at previous lines. -* Commands For Text:: Commands for changing text. -* Commands For Killing:: Commands for killing and yanking. -* Numeric Arguments:: Specifying numeric arguments, repeat counts. -* Commands For Completion:: Getting Readline to do the typing for you. -* Keyboard Macros:: Saving and re-executing typed characters -* Miscellaneous Commands:: Other miscellaneous commands. -@end menu - -This section describes Readline commands that may be bound to key -sequences. -@ifset BashFeatures -You can list your key bindings by executing -@w{@code{bind -P}} or, for a more terse format, suitable for an -@var{inputrc} file, @w{@code{bind -p}}. (@xref{Bash Builtins}.) -@end ifset -Command names without an accompanying key sequence are unbound by default. - -In the following descriptions, @dfn{point} refers to the current cursor -position, and @dfn{mark} refers to a cursor position saved by the -@code{set-mark} command. -The text between the point and mark is referred to as the @dfn{region}. - -@node Commands For Moving -@subsection Commands For Moving -@ftable @code -@item beginning-of-line (C-a) -Move to the start of the current line. - -@item end-of-line (C-e) -Move to the end of the line. - -@item forward-char (C-f) -Move forward a character. - -@item backward-char (C-b) -Move back a character. - -@item forward-word (M-f) -Move forward to the end of the next word. Words are composed of -letters and digits. - -@item backward-word (M-b) -Move back to the start of the current or previous word. Words are -composed of letters and digits. - -@item clear-screen (C-l) -Clear the screen and redraw the current line, -leaving the current line at the top of the screen. - -@item redraw-current-line () -Refresh the current line. By default, this is unbound. - -@end ftable - -@node Commands For History -@subsection Commands For Manipulating The History - -@ftable @code -@item accept-line (Newline or Return) -@ifset BashFeatures -Accept the line regardless of where the cursor is. -If this line is -non-empty, add it to the history list according to the setting of -the @env{HISTCONTROL} and @env{HISTIGNORE} variables. -If this line is a modified history line, then restore the history line -to its original state. -@end ifset -@ifclear BashFeatures -Accept the line regardless of where the cursor is. -If this line is -non-empty, it may be added to the history list for future recall with -@code{add_history()}. -If this line is a modified history line, the history line is restored -to its original state. -@end ifclear - -@item previous-history (C-p) -Move `back' through the history list, fetching the previous command. - -@item next-history (C-n) -Move `forward' through the history list, fetching the next command. - -@item beginning-of-history (M-<) -Move to the first line in the history. - -@item end-of-history (M->) -Move to the end of the input history, i.e., the line currently -being entered. - -@item reverse-search-history (C-r) -Search backward starting at the current line and moving `up' through -the history as necessary. This is an incremental search. - -@item forward-search-history (C-s) -Search forward starting at the current line and moving `down' through -the the history as necessary. This is an incremental search. - -@item non-incremental-reverse-search-history (M-p) -Search backward starting at the current line and moving `up' -through the history as necessary using a non-incremental search -for a string supplied by the user. - -@item non-incremental-forward-search-history (M-n) -Search forward starting at the current line and moving `down' -through the the history as necessary using a non-incremental search -for a string supplied by the user. - -@item history-search-forward () -Search forward through the history for the string of characters -between the start of the current line and the point. -This is a non-incremental search. -By default, this command is unbound. - -@item history-search-backward () -Search backward through the history for the string of characters -between the start of the current line and the point. This -is a non-incremental search. By default, this command is unbound. - -@item yank-nth-arg (M-C-y) -Insert the first argument to the previous command (usually -the second word on the previous line) at point. -With an argument @var{n}, -insert the @var{n}th word from the previous command (the words -in the previous command begin with word 0). A negative argument -inserts the @var{n}th word from the end of the previous command. - -@item yank-last-arg (M-. or M-_) -Insert last argument to the previous command (the last word of the -previous history entry). With an -argument, behave exactly like @code{yank-nth-arg}. -Successive calls to @code{yank-last-arg} move back through the history -list, inserting the last argument of each line in turn. - -@end ftable - -@node Commands For Text -@subsection Commands For Changing Text - -@ftable @code -@item delete-char (C-d) -Delete the character at point. If point is at the -beginning of the line, there are no characters in the line, and -the last character typed was not bound to @code{delete-char}, then -return @sc{eof}. - -@item backward-delete-char (Rubout) -Delete the character behind the cursor. A numeric argument means -to kill the characters instead of deleting them. - -@item forward-backward-delete-char () -Delete the character under the cursor, unless the cursor is at the -end of the line, in which case the character behind the cursor is -deleted. By default, this is not bound to a key. - -@item quoted-insert (C-q or C-v) -Add the next character typed to the line verbatim. This is -how to insert key sequences like @kbd{C-q}, for example. - -@ifclear BashFeatures -@item tab-insert (M-@key{TAB}) -Insert a tab character. -@end ifclear - -@item self-insert (a, b, A, 1, !, @dots{}) -Insert yourself. - -@item transpose-chars (C-t) -Drag the character before the cursor forward over -the character at the cursor, moving the -cursor forward as well. If the insertion point -is at the end of the line, then this -transposes the last two characters of the line. -Negative arguments have no effect. - -@item transpose-words (M-t) -Drag the word before point past the word after point, -moving point past that word as well. -If the insertion point is at the end of the line, this transposes -the last two words on the line. - -@item upcase-word (M-u) -Uppercase the current (or following) word. With a negative argument, -uppercase the previous word, but do not move the cursor. - -@item downcase-word (M-l) -Lowercase the current (or following) word. With a negative argument, -lowercase the previous word, but do not move the cursor. - -@item capitalize-word (M-c) -Capitalize the current (or following) word. With a negative argument, -capitalize the previous word, but do not move the cursor. - -@item overwrite-mode () -Toggle overwrite mode. With an explicit positive numeric argument, -switches to overwrite mode. With an explicit non-positive numeric -argument, switches to insert mode. This command affects only -@code{emacs} mode; @code{vi} mode does overwrite differently. -Each call to @code{readline()} starts in insert mode. - -In overwrite mode, characters bound to @code{self-insert} replace -the text at point rather than pushing the text to the right. -Characters bound to @code{backward-delete-char} replace the character -before point with a space. - -By default, this command is unbound. - -@end ftable - -@node Commands For Killing -@subsection Killing And Yanking - -@ftable @code - -@item kill-line (C-k) -Kill the text from point to the end of the line. - -@item backward-kill-line (C-x Rubout) -Kill backward to the beginning of the line. - -@item unix-line-discard (C-u) -Kill backward from the cursor to the beginning of the current line. - -@item kill-whole-line () -Kill all characters on the current line, no matter where point is. -By default, this is unbound. - -@item kill-word (M-d) -Kill from point to the end of the current word, or if between -words, to the end of the next word. -Word boundaries are the same as @code{forward-word}. - -@item backward-kill-word (M-@key{DEL}) -Kill the word behind point. -Word boundaries are the same as @code{backward-word}. - -@item unix-word-rubout (C-w) -Kill the word behind point, using white space as a word boundary. -The killed text is saved on the kill-ring. - -@item delete-horizontal-space () -Delete all spaces and tabs around point. By default, this is unbound. - -@item kill-region () -Kill the text in the current region. -By default, this command is unbound. - -@item copy-region-as-kill () -Copy the text in the region to the kill buffer, so it can be yanked -right away. By default, this command is unbound. - -@item copy-backward-word () -Copy the word before point to the kill buffer. -The word boundaries are the same as @code{backward-word}. -By default, this command is unbound. - -@item copy-forward-word () -Copy the word following point to the kill buffer. -The word boundaries are the same as @code{forward-word}. -By default, this command is unbound. - -@item yank (C-y) -Yank the top of the kill ring into the buffer at point. - -@item yank-pop (M-y) -Rotate the kill-ring, and yank the new top. You can only do this if -the prior command is @code{yank} or @code{yank-pop}. -@end ftable - -@node Numeric Arguments -@subsection Specifying Numeric Arguments -@ftable @code - -@item digit-argument (@kbd{M-0}, @kbd{M-1}, @dots{} @kbd{M--}) -Add this digit to the argument already accumulating, or start a new -argument. @kbd{M--} starts a negative argument. - -@item universal-argument () -This is another way to specify an argument. -If this command is followed by one or more digits, optionally with a -leading minus sign, those digits define the argument. -If the command is followed by digits, executing @code{universal-argument} -again ends the numeric argument, but is otherwise ignored. -As a special case, if this command is immediately followed by a -character that is neither a digit or minus sign, the argument count -for the next command is multiplied by four. -The argument count is initially one, so executing this function the -first time makes the argument count four, a second time makes the -argument count sixteen, and so on. -By default, this is not bound to a key. -@end ftable - -@node Commands For Completion -@subsection Letting Readline Type For You - -@ftable @code -@item complete (@key{TAB}) -Attempt to perform completion on the text before point. -The actual completion performed is application-specific. -@ifset BashFeatures -Bash attempts completion treating the text as a variable (if the -text begins with @samp{$}), username (if the text begins with -@samp{~}), hostname (if the text begins with @samp{@@}), or -command (including aliases and functions) in turn. If none -of these produces a match, filename completion is attempted. -@end ifset -@ifclear BashFeatures -The default is filename completion. -@end ifclear - -@item possible-completions (M-?) -List the possible completions of the text before point. - -@item insert-completions (M-*) -Insert all completions of the text before point that would have -been generated by @code{possible-completions}. - -@item menu-complete () -Similar to @code{complete}, but replaces the word to be completed -with a single match from the list of possible completions. -Repeated execution of @code{menu-complete} steps through the list -of possible completions, inserting each match in turn. -At the end of the list of completions, the bell is rung -(subject to the setting of @code{bell-style}) -and the original text is restored. -An argument of @var{n} moves @var{n} positions forward in the list -of matches; a negative argument may be used to move backward -through the list. -This command is intended to be bound to @key{TAB}, but is unbound -by default. - -@item delete-char-or-list () -Deletes the character under the cursor if not at the beginning or -end of the line (like @code{delete-char}). -If at the end of the line, behaves identically to -@code{possible-completions}. -This command is unbound by default. - -@ifset BashFeatures -@item complete-filename (M-/) -Attempt filename completion on the text before point. - -@item possible-filename-completions (C-x /) -List the possible completions of the text before point, -treating it as a filename. - -@item complete-username (M-~) -Attempt completion on the text before point, treating -it as a username. - -@item possible-username-completions (C-x ~) -List the possible completions of the text before point, -treating it as a username. - -@item complete-variable (M-$) -Attempt completion on the text before point, treating -it as a shell variable. - -@item possible-variable-completions (C-x $) -List the possible completions of the text before point, -treating it as a shell variable. - -@item complete-hostname (M-@@) -Attempt completion on the text before point, treating -it as a hostname. - -@item possible-hostname-completions (C-x @@) -List the possible completions of the text before point, -treating it as a hostname. - -@item complete-command (M-!) -Attempt completion on the text before point, treating -it as a command name. Command completion attempts to -match the text against aliases, reserved words, shell -functions, shell builtins, and finally executable filenames, -in that order. - -@item possible-command-completions (C-x !) -List the possible completions of the text before point, -treating it as a command name. - -@item dynamic-complete-history (M-@key{TAB}) -Attempt completion on the text before point, comparing -the text against lines from the history list for possible -completion matches. - -@item complete-into-braces (M-@{) -Perform filename completion and insert the list of possible completions -enclosed within braces so the list is available to the shell -(@pxref{Brace Expansion}). - -@end ifset -@end ftable - -@node Keyboard Macros -@subsection Keyboard Macros -@ftable @code - -@item start-kbd-macro (C-x () -Begin saving the characters typed into the current keyboard macro. - -@item end-kbd-macro (C-x )) -Stop saving the characters typed into the current keyboard macro -and save the definition. - -@item call-last-kbd-macro (C-x e) -Re-execute the last keyboard macro defined, by making the characters -in the macro appear as if typed at the keyboard. - -@end ftable - -@node Miscellaneous Commands -@subsection Some Miscellaneous Commands -@ftable @code - -@item re-read-init-file (C-x C-r) -Read in the contents of the @var{inputrc} file, and incorporate -any bindings or variable assignments found there. - -@item abort (C-g) -Abort the current editing command and -ring the terminal's bell (subject to the setting of -@code{bell-style}). - -@item do-uppercase-version (M-a, M-b, M-@var{x}, @dots{}) -If the metafied character @var{x} is lowercase, run the command -that is bound to the corresponding uppercase character. - -@item prefix-meta (@key{ESC}) -Metafy the next character typed. This is for keyboards -without a meta key. Typing @samp{@key{ESC} f} is equivalent to typing -@kbd{M-f}. - -@item undo (C-_ or C-x C-u) -Incremental undo, separately remembered for each line. - -@item revert-line (M-r) -Undo all changes made to this line. This is like executing the @code{undo} -command enough times to get back to the beginning. - -@ifset BashFeatures -@item tilde-expand (M-&) -@end ifset -@ifclear BashFeatures -@item tilde-expand (M-~) -@end ifclear -Perform tilde expansion on the current word. - -@item set-mark (C-@@) -Set the mark to the point. If a -numeric argument is supplied, the mark is set to that position. - -@item exchange-point-and-mark (C-x C-x) -Swap the point with the mark. The current cursor position is set to -the saved position, and the old cursor position is saved as the mark. - -@item character-search (C-]) -A character is read and point is moved to the next occurrence of that -character. A negative count searches for previous occurrences. - -@item character-search-backward (M-C-]) -A character is read and point is moved to the previous occurrence -of that character. A negative count searches for subsequent -occurrences. - -@item insert-comment (M-#) -Without a numeric argument, the value of the @code{comment-begin} -variable is inserted at the beginning of the current line. -If a numeric argument is supplied, this command acts as a toggle: if -the characters at the beginning of the line do not match the value -of @code{comment-begin}, the value is inserted, otherwise -the characters in @code{comment-begin} are deleted from the beginning of -the line. -In either case, the line is accepted as if a newline had been typed. -@ifset BashFeatures -The default value of @code{comment-begin} causes this command -to make the current line a shell comment. -If a numeric argument causes the comment character to be removed, the line -will be executed by the shell. -@end ifset - -@item dump-functions () -Print all of the functions and their key bindings to the -Readline output stream. If a numeric argument is supplied, -the output is formatted in such a way that it can be made part -of an @var{inputrc} file. This command is unbound by default. - -@item dump-variables () -Print all of the settable variables and their values to the -Readline output stream. If a numeric argument is supplied, -the output is formatted in such a way that it can be made part -of an @var{inputrc} file. This command is unbound by default. - -@item dump-macros () -Print all of the Readline key sequences bound to macros and the -strings they output. If a numeric argument is supplied, -the output is formatted in such a way that it can be made part -of an @var{inputrc} file. This command is unbound by default. - -@ifset BashFeatures -@item glob-complete-word (M-g) -The word before point is treated as a pattern for pathname expansion, -with an asterisk implicitly appended. This pattern is used to -generate a list of matching file names for possible completions. - -@item glob-expand-word (C-x *) -The word before point is treated as a pattern for pathname expansion, -and the list of matching file names is inserted, replacing the word. -If a numeric argument is supplied, a @samp{*} is appended before -pathname expansion. - -@item glob-list-expansions (C-x g) -The list of expansions that would have been generated by -@code{glob-expand-word} is displayed, and the line is redrawn. -If a numeric argument is supplied, a @samp{*} is appended before -pathname expansion. - -@item display-shell-version (C-x C-v) -Display version information about the current instance of Bash. - -@item shell-expand-line (M-C-e) -Expand the line as the shell does. -This performs alias and history expansion as well as all of the shell -word expansions (@pxref{Shell Expansions}). - -@item history-expand-line (M-^) -Perform history expansion on the current line. - -@item magic-space () -Perform history expansion on the current line and insert a space -(@pxref{History Interaction}). - -@item alias-expand-line () -Perform alias expansion on the current line (@pxref{Aliases}). - -@item history-and-alias-expand-line () -Perform history and alias expansion on the current line. - -@item insert-last-argument (M-. or M-_) -A synonym for @code{yank-last-arg}. - -@item operate-and-get-next (C-o) -Accept the current line for execution and fetch the next line -relative to the current line from the history for editing. Any -argument is ignored. - -@item edit-and-execute-command (C-xC-e) -Invoke an editor on the current command line, and execute the result as shell -commands. -Bash attempts to invoke -@code{$FCEDIT}, @code{$EDITOR}, and @code{emacs} -as the editor, in that order. - -@end ifset - -@ifclear BashFeatures -@item emacs-editing-mode (C-e) -When in @code{vi} command mode, this causes a switch to @code{emacs} -editing mode. - -@item vi-editing-mode (M-C-j) -When in @code{emacs} editing mode, this causes a switch to @code{vi} -editing mode. - -@end ifclear - -@end ftable - -@node Readline vi Mode -@section Readline vi Mode - -While the Readline library does not have a full set of @code{vi} -editing functions, it does contain enough to allow simple editing -of the line. The Readline @code{vi} mode behaves as specified in -the @sc{posix} 1003.2 standard. - -@ifset BashFeatures -In order to switch interactively between @code{emacs} and @code{vi} -editing modes, use the @samp{set -o emacs} and @samp{set -o vi} -commands (@pxref{The Set Builtin}). -@end ifset -@ifclear BashFeatures -In order to switch interactively between @code{emacs} and @code{vi} -editing modes, use the command @kbd{M-C-j} (bound to emacs-editing-mode -when in @code{vi} mode and to vi-editing-mode in @code{emacs} mode). -@end ifclear -The Readline default is @code{emacs} mode. - -When you enter a line in @code{vi} mode, you are already placed in -`insertion' mode, as if you had typed an @samp{i}. Pressing @key{ESC} -switches you into `command' mode, where you can edit the text of the -line with the standard @code{vi} movement keys, move to previous -history lines with @samp{k} and subsequent lines with @samp{j}, and -so forth. - -@ifset BashFeatures -@node Programmable Completion -@section Programmable Completion -@cindex programmable completion - -When word completion is attempted for an argument to a command for -which a completion specification (a @var{compspec}) has been defined -using the @code{complete} builtin (@pxref{Programmable Completion Builtins}), -the programmable completion facilities are invoked. - -First, the command name is identified. -If a compspec has been defined for that command, the -compspec is used to generate the list of possible completions for the word. -If the command word is a full pathname, a compspec for the full -pathname is searched for first. -If no compspec is found for the full pathname, an attempt is made to -find a compspec for the portion following the final slash. - -Once a compspec has been found, it is used to generate the list of -matching words. -If a compspec is not found, the default Bash completion -described above (@pxref{Commands For Completion}) is performed. - -First, the actions specified by the compspec are used. -Only matches which are prefixed by the word being completed are -returned. -When the @option{-f} or @option{-d} option is used for filename or -directory name completion, the shell variable @env{FIGNORE} is -used to filter the matches. -@xref{Bash Variables}, for a description of @env{FIGNORE}. - -Any completions specified by a filename expansion pattern to the -@option{-G} option are generated next. -The words generated by the pattern need not match the word being completed. -The @env{GLOBIGNORE} shell variable is not used to filter the matches, -but the @env{FIGNORE} shell variable is used. - -Next, the string specified as the argument to the @option{-W} option -is considered. -The string is first split using the characters in the @env{IFS} -special variable as delimiters. -Shell quoting is honored. -Each word is then expanded using -brace expansion, tilde expansion, parameter and variable expansion, -command substitution, arithmetic expansion, and pathname expansion, -as described above (@pxref{Shell Expansions}). -The results are split using the rules described above -(@pxref{Word Splitting}). -The results of the expansion are prefix-matched against the word being -completed, and the matching words become the possible completions. - -After these matches have been generated, any shell function or command -specified with the @option{-F} and @option{-C} options is invoked. -When the command or function is invoked, the @env{COMP_LINE} and -@env{COMP_POINT} variables are assigned values as described above -(@pxref{Bash Variables}). -If a shell function is being invoked, the @env{COMP_WORDS} and -@env{COMP_CWORD} variables are also set. -When the function or command is invoked, the first argument is the -name of the command whose arguments are being completed, the -second argument is the word being completed, and the third argument -is the word preceding the word being completed on the current command line. -No filtering of the generated completions against the word being completed -is performed; the function or command has complete freedom in generating -the matches. - -Any function specified with @option{-F} is invoked first. -The function may use any of the shell facilities, including the -@code{compgen} builtin described below -(@pxref{Programmable Completion Builtins}), to generate the matches. -It must put the possible completions in the @env{COMPREPLY} array -variable. - -Next, any command specified with the @option{-C} option is invoked -in an environment equivalent to command substitution. -It should print a list of completions, one per line, to -the standard output. -Backslash may be used to escape a newline, if necessary. - -After all of the possible completions are generated, any filter -specified with the @option{-X} option is applied to the list. -The filter is a pattern as used for pathname expansion; a @samp{&} -in the pattern is replaced with the text of the word being completed. -A literal @samp{&} may be escaped with a backslash; the backslash -is removed before attempting a match. -Any completion that matches the pattern will be removed from the list. -A leading @samp{!} negates the pattern; in this case any completion -not matching the pattern will be removed. - -Finally, any prefix and suffix specified with the @option{-P} and @option{-S} -options are added to each member of the completion list, and the result is -returned to the Readline completion code as the list of possible -completions. - -If the previously-applied actions do not generate any matches, and the -@option{-o dirnames} option was supplied to @code{complete} when the -compspec was defined, directory name completion is attempted. - -By default, if a compspec is found, whatever it generates is returned to -the completion code as the full set of possible completions. -The default Bash completions are not attempted, and the Readline default -of filename completion is disabled. -If the @option{-o default} option was supplied to @code{complete} when the -compspec was defined, Readline's default completion will be performed -if the compspec generates no matches. - -When a compspec indicates that directory name completion is desired, -the programmable completion functions force Readline to append a slash -to completed names which are symbolic links to directories, subject to -the value of the @var{mark-directories} Readline variable, regardless -of the setting of the @var{mark-symlinked-directories} Readline variable. - -@node Programmable Completion Builtins -@section Programmable Completion Builtins -@cindex completion builtins - -Two builtin commands are available to manipulate the programmable completion -facilities. - -@table @code -@item compgen -@btindex compgen -@example -@code{compgen [@var{option}] [@var{word}]} -@end example - -Generate possible completion matches for @var{word} according to -the @var{option}s, which may be any option accepted by the -@code{complete} -builtin with the exception of @option{-p} and @option{-r}, and write -the matches to the standard output. -When using the @option{-F} or @option{-C} options, the various shell variables -set by the programmable completion facilities, while available, will not -have useful values. - -The matches will be generated in the same way as if the programmable -completion code had generated them directly from a completion specification -with the same flags. -If @var{word} is specified, only those completions matching @var{word} -will be displayed. - -The return value is true unless an invalid option is supplied, or no -matches were generated. - -@item complete -@btindex complete -@example -@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}] -[-P @var{prefix}] [-S @var{suffix}] [-X @var{filterpat}] [-F @var{function}] -[-C @var{command}] @var{name} [@var{name} @dots{}]} -@code{complete -pr [@var{name} @dots{}]} -@end example - -Specify how arguments to each @var{name} should be completed. -If the @option{-p} option is supplied, or if no options are supplied, existing -completion specifications are printed in a way that allows them to be -reused as input. -The @option{-r} option removes a completion specification for -each @var{name}, or, if no @var{name}s are supplied, all -completion specifications. - -The process of applying these completion specifications when word completion -is attempted is described above (@pxref{Programmable Completion}). - -Other options, if specified, have the following meanings. -The arguments to the @option{-G}, @option{-W}, and @option{-X} options -(and, if necessary, the @option{-P} and @option{-S} options) -should be quoted to protect them from expansion before the -@code{complete} builtin is invoked. - - -@table @code -@item -o @var{comp-option} -The @var{comp-option} controls several aspects of the compspec's behavior -beyond the simple generation of completions. -@var{comp-option} may be one of: - -@table @code - -@item default -Use Readline's default filename completion if the compspec generates -no matches. - -@item dirnames -Perform directory name completion if the compspec generates no matches. - -@item filenames -Tell Readline that the compspec generates filenames, so it can perform any -filename\-specific processing (like adding a slash to directory names or -suppressing trailing spaces). This option is intended to be used with -shell functions specified with @option{-F}. - -@item nospace -Tell Readline not to append a space (the default) to words completed at -the end of the line. -@end table - -@item -A @var{action} -The @var{action} may be one of the following to generate a list of possible -completions: - -@table @code -@item alias -Alias names. May also be specified as @option{-a}. - -@item arrayvar -Array variable names. - -@item binding -Readline key binding names (@pxref{Bindable Readline Commands}). - -@item builtin -Names of shell builtin commands. May also be specified as @option{-b}. - -@item command -Command names. May also be specified as @option{-c}. - -@item directory -Directory names. May also be specified as @option{-d}. - -@item disabled -Names of disabled shell builtins. - -@item enabled -Names of enabled shell builtins. - -@item export -Names of exported shell variables. May also be specified as @option{-e}. - -@item file -File names. May also be specified as @option{-f}. - -@item function -Names of shell functions. - -@item group -Group names. May also be specified as @option{-g}. - -@item helptopic -Help topics as accepted by the @code{help} builtin (@pxref{Bash Builtins}). - -@item hostname -Hostnames, as taken from the file specified by the -@env{HOSTFILE} shell variable (@pxref{Bash Variables}). - -@item job -Job names, if job control is active. May also be specified as @option{-j}. - -@item keyword -Shell reserved words. May also be specified as @option{-k}. - -@item running -Names of running jobs, if job control is active. - -@item service -Service names. May also be specified as @option{-s}. - -@item setopt -Valid arguments for the @option{-o} option to the @code{set} builtin -(@pxref{The Set Builtin}). - -@item shopt -Shell option names as accepted by the @code{shopt} builtin -(@pxref{Bash Builtins}). - -@item signal -Signal names. - -@item stopped -Names of stopped jobs, if job control is active. - -@item user -User names. May also be specified as @option{-u}. - -@item variable -Names of all shell variables. May also be specified as @option{-v}. -@end table - -@item -G @var{globpat} -The filename expansion pattern @var{globpat} is expanded to generate -the possible completions. - -@item -W @var{wordlist} -The @var{wordlist} is split using the characters in the -@env{IFS} special variable as delimiters, and each resultant word -is expanded. -The possible completions are the members of the resultant list which -match the word being completed. - -@item -C @var{command} -@var{command} is executed in a subshell environment, and its output is -used as the possible completions. - -@item -F @var{function} -The shell function @var{function} is executed in the current shell -environment. -When it finishes, the possible completions are retrieved from the value -of the @env{COMPREPLY} array variable. - -@item -X @var{filterpat} -@var{filterpat} is a pattern as used for filename expansion. -It is applied to the list of possible completions generated by the -preceding options and arguments, and each completion matching -@var{filterpat} is removed from the list. -A leading @samp{!} in @var{filterpat} negates the pattern; in this -case, any completion not matching @var{filterpat} is removed. - -@item -P @var{prefix} -@var{prefix} is added at the beginning of each possible completion -after all other options have been applied. - -@item -S @var{suffix} -@var{suffix} is appended to each possible completion -after all other options have been applied. -@end table - -The return value is true unless an invalid option is supplied, an option -other than @option{-p} or @option{-r} is supplied without a @var{name} -argument, an attempt is made to remove a completion specification for -a @var{name} for which no specification exists, or -an error occurs adding a completion specification. - -@end table -@end ifset diff --git a/gnu/usr.bin/gdb/gdbtui/Makefile b/gnu/usr.bin/gdb/gdbtui/Makefile new file mode 100644 index 0000000000..f326756308 --- /dev/null +++ b/gnu/usr.bin/gdb/gdbtui/Makefile @@ -0,0 +1,21 @@ +# $DragonFly: src/gnu/usr.bin/gdb/gdbtui/Makefile,v 1.1 2008/01/14 21:36:38 corecode Exp $ + +PROG= gdbtui +SRCS= tui-main.c + +CFLAGS+= -I${.OBJDIR}/../libgdb -I${.CURDIR}/../libgdb -I${BASEDIR}/include +CFLAGS+= -I${BASEDIR}/bfd -I${BASEDIR}/gdb -I${BASEDIR}/gdb/config -I${.CURDIR}/../libbfd +CLFAGS+= -I${BASEDIR} + +DPADD= ${GDBLIBS} +DPADD+= ${LIBEDIT} ${LIBKVM} ${LIBTERMCAP} ${LIBM} +LDADD= -L../libgdb -lgdb -L../libbfd -lbfd -L../libopcodes -lopcodes -L../libiberty -liberty +LDADD+= -ledit -lkvm -ltermcap -lm + +NOMAN= # + +#SUBDIR= doc + +.include + +.PATH: ${BASEDIR}/gdb ${BASEDIR}/gdb/tui diff --git a/gnu/usr.bin/gdb/kgdb/kgdb.c b/gnu/usr.bin/gdb/kgdb/kgdb.c index 295a70deb4..63d955e85d 100644 --- a/gnu/usr.bin/gdb/kgdb/kgdb.c +++ b/gnu/usr.bin/gdb/kgdb/kgdb.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/main.c,v 1.11 2006/01/04 23:17:52 kan Exp $ - * $DragonFly: src/gnu/usr.bin/gdb/kgdb/kgdb.c,v 1.2 2007/08/25 21:59:05 corecode Exp $ + * $DragonFly: src/gnu/usr.bin/gdb/kgdb/kgdb.c,v 1.3 2008/01/14 21:36:38 corecode Exp $ */ #include @@ -292,8 +292,8 @@ kgdb_init(char *argv0 __unused) set_prompt("(kgdb) "); kgdb_display_msgbuf(); - print_stack_frame(get_selected_frame(), - frame_relative_level(get_selected_frame()), 1); + print_stack_frame(get_selected_frame(NULL), + frame_relative_level(get_selected_frame(NULL)), 1); } int diff --git a/gnu/usr.bin/gdb/kgdb/kgdb.h b/gnu/usr.bin/gdb/kgdb/kgdb.h index bc09bbf864..927ea5076d 100644 --- a/gnu/usr.bin/gdb/kgdb/kgdb.h +++ b/gnu/usr.bin/gdb/kgdb/kgdb.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.3 2005/09/10 18:25:53 marcel Exp $ - * $DragonFly: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.3 2007/08/25 21:59:05 corecode Exp $ + * $DragonFly: src/gnu/usr.bin/gdb/kgdb/kgdb.h,v 1.4 2008/01/14 21:36:38 corecode Exp $ */ #ifndef _KGDB_H_ @@ -49,8 +49,8 @@ extern struct kthr *curkthr; uintptr_t lookup(const char *); void kgdb_target(void); -void kgdb_trgt_fetch_registers(int); -void kgdb_trgt_store_registers(int); +void kgdb_trgt_fetch_registers(struct regcache *, int); +void kgdb_trgt_store_registers(struct regcache *, int); extern const struct frame_unwind kgdb_trgt_trapframe_unwind; diff --git a/gnu/usr.bin/gdb/kgdb/kthr.c b/gnu/usr.bin/gdb/kgdb/kthr.c index 974472e87f..f1f2520d0b 100644 --- a/gnu/usr.bin/gdb/kgdb/kthr.c +++ b/gnu/usr.bin/gdb/kgdb/kthr.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/kthr.c,v 1.3 2005/09/10 18:25:53 marcel Exp $ - * $DragonFly: src/gnu/usr.bin/gdb/kgdb/kthr.c,v 1.4 2007/11/25 18:10:06 swildner Exp $ + * $DragonFly: src/gnu/usr.bin/gdb/kgdb/kthr.c,v 1.5 2008/01/14 21:36:38 corecode Exp $ */ #define _KERNEL_STRUCTURES @@ -104,7 +104,7 @@ kgdb_thr_init(void) kvm_read(kvm, prvspace + offsetof(struct privatespace, mdglobaldata), &gd, sizeof(struct mdglobaldata)); - dumptid = gd.mi.gd_curthread; + dumptid = (intptr_t)gd.mi.gd_curthread; } else { /* We must be a live system */ dumptid = -1; diff --git a/gnu/usr.bin/gdb/kgdb/trgt.c b/gnu/usr.bin/gdb/kgdb/trgt.c index 4b22e0d805..c73a0c32f7 100644 --- a/gnu/usr.bin/gdb/kgdb/trgt.c +++ b/gnu/usr.bin/gdb/kgdb/trgt.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.4 2005/09/10 18:25:53 marcel Exp $ - * $DragonFly: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.1 2006/03/07 15:48:11 corecode Exp $ + * $DragonFly: src/gnu/usr.bin/gdb/kgdb/trgt.c,v 1.2 2008/01/14 21:36:38 corecode Exp $ */ #include @@ -98,22 +98,22 @@ kgdb_trgt_thread_alive(ptid_t ptid) return (kgdb_thr_lookup_tid(ptid_get_tid(ptid)) != NULL); } -static int -kgdb_trgt_xfer_memory(CORE_ADDR memaddr, char *myaddr, int len, int write, - struct mem_attrib *attrib, struct target_ops *target) +static LONGEST +kgdb_trgt_xfer_partial(struct target_ops *ops, enum target_object object, + const char *annex, gdb_byte *readbuf, + const gdb_byte *writebuf, + ULONGEST offset, LONGEST len) { - struct target_ops *tb; - if (kvm != NULL) { if (len == 0) return (0); - if (!write) - return (kvm_read(kvm, memaddr, myaddr, len)); - else - return (kvm_write(kvm, memaddr, myaddr, len)); + if (writebuf != NULL) + return (kvm_write(kvm, offset, writebuf, len)); + if (readbuf != NULL) + return (kvm_read(kvm, offset, readbuf, len)); } - tb = find_target_beneath(target); - return (tb->to_xfer_memory(memaddr, myaddr, len, write, attrib, tb)); + return (ops->beneath->to_xfer_partial(ops->beneath, object, annex, + readbuf, writebuf, offset, len)); } void @@ -138,7 +138,7 @@ kgdb_target(void) kgdb_trgt_ops.to_pid_to_str = kgdb_trgt_pid_to_str; kgdb_trgt_ops.to_store_registers = kgdb_trgt_store_registers; kgdb_trgt_ops.to_thread_alive = kgdb_trgt_thread_alive; - kgdb_trgt_ops.to_xfer_memory = kgdb_trgt_xfer_memory; + kgdb_trgt_ops.to_xfer_partial = kgdb_trgt_xfer_partial; add_target(&kgdb_trgt_ops); push_target(&kgdb_trgt_ops); diff --git a/gnu/usr.bin/gdb/kgdb/trgt_i386.c b/gnu/usr.bin/gdb/kgdb/trgt_i386.c index b5a8a5df0f..c0b6d443a8 100644 --- a/gnu/usr.bin/gdb/kgdb/trgt_i386.c +++ b/gnu/usr.bin/gdb/kgdb/trgt_i386.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.5 2005/09/11 05:36:30 marcel Exp $ - * $DragonFly: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.4 2007/01/24 18:56:30 dillon Exp $ + * $DragonFly: src/gnu/usr.bin/gdb/kgdb/trgt_i386.c,v 1.5 2008/01/14 21:36:38 corecode Exp $ */ #include @@ -49,14 +49,16 @@ #include "kgdb.h" void -kgdb_trgt_fetch_registers(int regno __unused) +kgdb_trgt_fetch_registers(struct regcache *regcache, int regno) { struct kthr *kt; struct pcb pcb; kt = kgdb_thr_lookup_tid(ptid_get_tid(inferior_ptid)); - if (kt == NULL) + if (kt == NULL) { + regcache_raw_supply(regcache, regno, NULL); return; + } /* * kt->pcb == NULL is a marker for "non-dumping kernel thread". @@ -82,13 +84,13 @@ kgdb_trgt_fetch_registers(int regno __unused) warnx("kvm_read: %s", kvm_geterr(kvm)); memset(regs, 0, sizeof(regs)); } - supply_register(I386_EDI_REGNUM, ®s[0]); - supply_register(I386_ESI_REGNUM, ®s[1]); - supply_register(I386_EBX_REGNUM, ®s[2]); - supply_register(I386_EBP_REGNUM, ®s[3]); - supply_register(I386_EIP_REGNUM, ®s[4]); + regcache_raw_supply(regcache, I386_EDI_REGNUM, ®s[0]); + regcache_raw_supply(regcache, I386_ESI_REGNUM, ®s[1]); + regcache_raw_supply(regcache, I386_EBX_REGNUM, ®s[2]); + regcache_raw_supply(regcache, I386_EBP_REGNUM, ®s[3]); + regcache_raw_supply(regcache, I386_EIP_REGNUM, ®s[4]); sp += 7 * sizeof(regs[0]); - supply_register(I386_ESP_REGNUM, &sp); + regcache_raw_supply(regcache, I386_ESP_REGNUM, &sp); return; } @@ -96,16 +98,16 @@ kgdb_trgt_fetch_registers(int regno __unused) warnx("kvm_read: %s", kvm_geterr(kvm)); memset(&pcb, 0, sizeof(pcb)); } - supply_register(I386_EBX_REGNUM, (char *)&pcb.pcb_ebx); - supply_register(I386_ESP_REGNUM, (char *)&pcb.pcb_esp); - supply_register(I386_EBP_REGNUM, (char *)&pcb.pcb_ebp); - supply_register(I386_ESI_REGNUM, (char *)&pcb.pcb_esi); - supply_register(I386_EDI_REGNUM, (char *)&pcb.pcb_edi); - supply_register(I386_EIP_REGNUM, (char *)&pcb.pcb_eip); + regcache_raw_supply(regcache, I386_EBX_REGNUM, (char *)&pcb.pcb_ebx); + regcache_raw_supply(regcache, I386_ESP_REGNUM, (char *)&pcb.pcb_esp); + regcache_raw_supply(regcache, I386_EBP_REGNUM, (char *)&pcb.pcb_ebp); + regcache_raw_supply(regcache, I386_ESI_REGNUM, (char *)&pcb.pcb_esi); + regcache_raw_supply(regcache, I386_EDI_REGNUM, (char *)&pcb.pcb_edi); + regcache_raw_supply(regcache, I386_EIP_REGNUM, (char *)&pcb.pcb_eip); } void -kgdb_trgt_store_registers(int regno __unused) +kgdb_trgt_store_registers(struct regcache *regcache, int regno __unused) { fprintf_unfiltered(gdb_stderr, "XXX: %s\n", __func__); } @@ -145,21 +147,23 @@ kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache) if (cache == NULL) { cache = FRAME_OBSTACK_ZALLOC(struct kgdb_frame_cache); *this_cache = cache; - cache->pc = frame_func_unwind(next_frame); + cache->pc = get_frame_address_in_block(next_frame); find_pc_partial_function(cache->pc, &pname, NULL, NULL); /* - * Handle weird trapframe cases + * Handle weird trapframe cases: + * + * 4 for pushed esp (IN the function!) + * + 8 for cpl/intno (IN the function, only intrs) */ + cache->intrframe = 4; if (pname[0] == 'X') - cache->intrframe = 4; - else if (strcmp(pname, "calltrap") == 0) - cache->intrframe = 4; - else - cache->intrframe = 0; - frame_unwind_register(next_frame, SP_REGNUM, buf); + cache->intrframe += offsetof(struct intrframe, if_esp) - + offsetof(struct trapframe, tf_esp); + + frame_unwind_register(next_frame, I386_ESP_REGNUM, buf); cache->sp = extract_unsigned_integer(buf, - register_size(current_gdbarch, SP_REGNUM)); + register_size(current_gdbarch, I386_ESP_REGNUM)); } return (cache); } @@ -177,7 +181,7 @@ kgdb_trgt_trapframe_this_id(struct frame_info *next_frame, void **this_cache, static void kgdb_trgt_trapframe_prev_register(struct frame_info *next_frame, void **this_cache, int regnum, int *optimizedp, enum lval_type *lvalp, - CORE_ADDR *addrp, int *realnump, void *valuep) + CORE_ADDR *addrp, int *realnump, gdb_byte *valuep) { char dummy_valuep[MAX_REGISTER_SIZE]; struct kgdb_frame_cache *cache; @@ -228,7 +232,7 @@ kgdb_trgt_trapframe_sniffer(const struct frame_unwind *self, char *pname; CORE_ADDR pc; - pc = frame_unwind_address_in_block(next_frame); + pc = frame_unwind_address_in_block(next_frame, NORMAL_FRAME); pname = NULL; find_pc_partial_function(pc, &pname, NULL, NULL); if (pname == NULL) @@ -242,7 +246,7 @@ kgdb_trgt_trapframe_sniffer(const struct frame_unwind *self, } const struct frame_unwind kgdb_trgt_trapframe_unwind = { - UNKNOWN_FRAME, + NORMAL_FRAME, &kgdb_trgt_trapframe_this_id, &kgdb_trgt_trapframe_prev_register, .sniffer = kgdb_trgt_trapframe_sniffer diff --git a/gnu/usr.bin/gdb/libbfd/Makefile b/gnu/usr.bin/gdb/libbfd/Makefile index d204112b2e..96ab77b904 100644 --- a/gnu/usr.bin/gdb/libbfd/Makefile +++ b/gnu/usr.bin/gdb/libbfd/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile,v 1.1 2004/10/23 17:02:38 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile,v 1.2 2008/01/14 21:36:38 corecode Exp $ .include "../Makefile.inc" @@ -9,10 +9,12 @@ CONTRIBDIR= ${BASEDIR}/bfd .PATH: ${CONTRIBDIR} CFLAGS+= -I${BASEDIR}/include -I${CONTRIBDIR} -I${.CURDIR} -I${.OBJDIR} +# XXX no clue what DEBUGDIR is for +CFLAGS+= -DDEBUGDIR='"/usr/lib/debug"' SRCS= archive.c archive64.c archures.c bfd.c bfdio.c bfdwin.c binary.c SRCS+= cache.c coffgen.c cofflink.c corefile.c dwarf1.c dwarf2.c -SRCS+= elf-eh-frame.c elf-strtab.c elf.c elflink.c +SRCS+= elf-eh-frame.c elf-strtab.c elf.c elflink.c elf-attrs.c SRCS+= format.c hash.c ihex.c init.c libbfd.c linker.c merge.c opncls.c SRCS+= reloc.c section.c simple.c srec.c stab-syms.c stabs.c syms.c SRCS+= targets.c tekhex.c @@ -30,4 +32,10 @@ elf64-target.h: elfxx-target.h .include "Makefile.${MACHINE_ARCH}" +SRCS+= bfd_stdint.h +CLEANFILES+= bfd_stdint.h + +bfd_stdint.h: + touch ${.TARGET} + .include diff --git a/gnu/usr.bin/gdb/libbfd/Makefile.i386 b/gnu/usr.bin/gdb/libbfd/Makefile.i386 index 30c7c563d6..75b6333eff 100644 --- a/gnu/usr.bin/gdb/libbfd/Makefile.i386 +++ b/gnu/usr.bin/gdb/libbfd/Makefile.i386 @@ -1,10 +1,10 @@ -# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile.i386,v 1.1 2004/10/23 17:02:38 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/libbfd/Makefile.i386,v 1.2 2008/01/14 21:36:38 corecode Exp $ SRCS+= elf32-gen.c elf32.c elf32-target.h SRCS+= coff-i386.c cpu-i386.c elf32-i386.c -CFLAGS+= -DDEFAULT_VECTOR=bfd_elf32_i386_freebsd_vec \ - -DSELECT_VECS='&bfd_elf32_i386_freebsd_vec,&i386coff_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' \ - -DSELECT_ARCHITECTURES='&bfd_i386_arch' -DHAVE_bfd_elf32_i386_freebsd_vec \ +CFLAGS+= -DDEFAULT_VECTOR=bfd_elf32_i386_vec \ + -DSELECT_VECS='&bfd_elf32_i386_vec,&i386coff_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec' \ + -DSELECT_ARCHITECTURES='&bfd_i386_arch' -DHAVE_bfd_elf32_i386_vec \ -DHAVE_i386coff_vec -DHAVE_bfd_elf32_little_generic_vec \ -DHAVE_bfd_elf32_big_generic_vec diff --git a/gnu/usr.bin/gdb/libbfd/bfd.h b/gnu/usr.bin/gdb/libbfd/bfd.h index b8445675b9..408eafc8ab 100644 --- a/gnu/usr.bin/gdb/libbfd/bfd.h +++ b/gnu/usr.bin/gdb/libbfd/bfd.h @@ -1,4 +1,4 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libbfd/Attic/bfd.h,v 1.2 2005/02/17 13:59:35 joerg Exp $ */ +/* $DragonFly: src/gnu/usr.bin/gdb/libbfd/Attic/bfd.h,v 1.3 2008/01/14 21:36:38 corecode Exp $ */ /* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c", @@ -9,7 +9,8 @@ /* Main header file for the bfd library -- portable access to object files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -17,7 +18,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -27,7 +28,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ @@ -50,6 +51,29 @@ extern "C" { #endif #endif +/* This is a utility macro to handle the situation where the code + wants to place a constant string into the code, followed by a + comma and then the length of the string. Doing this by hand + is error prone, so using this macro is safer. */ +#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1) +/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro + to create the arguments to another macro, since the preprocessor + will mis-count the number of arguments to the outer macro (by not + evaluating STRING_COMMA_LEN and so missing the comma). This is a + problem for example when trying to use STRING_COMMA_LEN to build + the arguments to the strncmp() macro. Hence this alternative + definition of strncmp is provided here. + + Note - these macros do NOT work if STR2 is not a constant string. */ +#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) + /* strcpy() can have a similar problem, but since we know we are + copying a constant string, we can use memcpy which will be faster + since there is no need to check for a NUL byte inside STR. We + can also save time if we do not need to copy the terminating NUL. */ +#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1) +#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) + + /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ @@ -59,6 +83,7 @@ extern "C" { #define BFD_DEFAULT_TARGET_SIZE 32 #define BFD_HOST_64BIT_LONG 0 +#define BFD_HOST_64BIT_LONG_LONG 0 #define BFD_HOST_LONG_LONG 1 #if 1 #define BFD_HOST_64_BIT long long @@ -79,6 +104,10 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif #endif +/* Declaring a type wide enough to hold a host long and a host pointer. */ +#define BFD_HOSTPTR_T unsigned long +typedef BFD_HOSTPTR_T bfd_hostptr_t; + /* Forward declaration. */ typedef struct bfd bfd; @@ -97,14 +126,6 @@ typedef int bfd_boolean; #define FALSE 0 #define TRUE 1 -#if 0 -/* Poison. */ -#undef false -#undef true -#define false dont_use_false_in_bfd -#define true dont_use_true_in_bfd -#endif - #ifdef BFD64 #ifndef BFD_HOST_64_BIT @@ -120,6 +141,9 @@ typedef BFD_HOST_U_64_BIT symvalue; #if BFD_HOST_64BIT_LONG #define sprintf_vma(s,x) sprintf (s, "%016lx", x) #define fprintf_vma(f,x) fprintf (f, "%016lx", x) +#elif BFD_HOST_64BIT_LONG_LONG +#define sprintf_vma(s,x) sprintf (s, "%016llx", x) +#define fprintf_vma(f,x) fprintf (f, "%016llx", x) #else #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff))) #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) @@ -152,6 +176,9 @@ typedef unsigned long bfd_size_type; #endif /* not BFD64 */ +#define HALF_BFD_SIZE_TYPE \ + (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2)) + #ifndef BFD_HOST_64_BIT /* Fall back on a 32 bit type. The idea is to make these types always available for function return types, but in the case that @@ -246,6 +273,10 @@ bfd_format; /* The sections in this BFD specify a memory page. */ #define HAS_LOAD_PAGE 0x1000 + +/* This BFD has been created by the linker and doesn't correspond + to any input file. */ +#define BFD_LINKER_CREATED 0x2000 /* Symbols and relocation. */ @@ -334,7 +365,15 @@ typedef struct bfd_section *sec_ptr; (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \ / bfd_octets_per_byte (bfd)) -typedef struct stat stat_type; +/* Return TRUE if section has been discarded. */ +#define elf_discarded_section(sec) \ + (!bfd_is_abs_section (sec) \ + && bfd_is_abs_section ((sec)->output_section) \ + && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \ + && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS) + +/* Forward define. */ +struct stat; typedef enum bfd_print_symbol { @@ -382,8 +421,6 @@ struct bfd_hash_table { /* The hash array. */ struct bfd_hash_entry **table; - /* The number of slots in the hash table. */ - unsigned int size; /* A function used to create new elements in the hash table. The first entry is itself a pointer to an element. When this function is first invoked, this pointer will be NULL. However, @@ -396,6 +433,14 @@ struct bfd_hash_table /* An objalloc for this hash table. This is a struct objalloc *, but we use void * to avoid requiring the inclusion of objalloc.h. */ void *memory; + /* The number of slots in the hash table. */ + unsigned int size; + /* The number of entries in the hash table. */ + unsigned int count; + /* The size of elements. */ + unsigned int entsize; + /* If non-zero, don't grow the hash table. */ + unsigned int frozen:1; }; /* Initialize a hash table. */ @@ -403,7 +448,8 @@ extern bfd_boolean bfd_hash_table_init (struct bfd_hash_table *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, - const char *)); + const char *), + unsigned int); /* Initialize a hash table specifying a size. */ extern bfd_boolean bfd_hash_table_init_n @@ -411,7 +457,7 @@ extern bfd_boolean bfd_hash_table_init_n struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), - unsigned int size); + unsigned int, unsigned int); /* Free up a hash table. */ extern void bfd_hash_table_free @@ -481,10 +527,10 @@ extern int bfd_stat (bfd *, struct stat *); /* Deprecated old routines. */ #if __GNUC__ #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_read", __FILE__, __LINE__, __func__), \ + (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \ - (warn_deprecated ("bfd_write", __FILE__, __LINE__, __func__), \ + (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD))) #else #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \ @@ -567,6 +613,9 @@ void bfd_putl16 (bfd_vma, void *); bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); + +extern bfd_boolean bfd_section_already_linked_table_init (void); +extern void bfd_section_already_linked_table_free (void); /* Externally visible ECOFF routines. */ @@ -633,28 +682,44 @@ struct bfd_link_needed_list enum dynamic_lib_link_class { DYN_NORMAL = 0, DYN_AS_NEEDED = 1, - DYN_DT_NEEDED = 2 + DYN_DT_NEEDED = 2, + DYN_NO_ADD_NEEDED = 4, + DYN_NO_NEEDED = 8 +}; + +enum notice_asneeded_action { + notice_as_needed, + notice_not_needed, + notice_needed }; extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean); + (bfd *, struct bfd_link_info *, const char *, bfd_boolean, + bfd_boolean); extern struct bfd_link_needed_list *bfd_elf_get_needed_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf_get_bfd_needed_list (bfd *, struct bfd_link_needed_list **); extern bfd_boolean bfd_elf_size_dynamic_sections (bfd *, const char *, const char *, const char *, const char * const *, - struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); + struct bfd_link_info *, struct bfd_section **, + struct bfd_elf_version_tree *); +extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr + (bfd *, struct bfd_link_info *); extern void bfd_elf_set_dt_needed_name (bfd *, const char *); extern const char *bfd_elf_get_dt_soname (bfd *); extern void bfd_elf_set_dyn_lib_class - (bfd *, int); + (bfd *, enum dynamic_lib_link_class); +extern int bfd_elf_get_dyn_lib_class + (bfd *); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf_discard_info (bfd *, struct bfd_link_info *); +extern unsigned int _bfd_elf_default_action_discarded + (struct bfd_section *); /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error @@ -686,7 +751,7 @@ extern int bfd_get_elf_phdrs the remote memory. */ extern bfd *bfd_elf_bfd_from_remote_memory (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, char *myaddr, int len)); + int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len)); /* Return the arch_size field of an elf bfd, or -1 if not elf. */ extern int bfd_get_arch_size @@ -699,8 +764,20 @@ extern int bfd_get_sign_extend_vma extern struct bfd_section *_bfd_elf_tls_setup (bfd *, struct bfd_link_info *); +extern void _bfd_fix_excluded_sec_syms + (bfd *, struct bfd_link_info *); + +extern unsigned bfd_m68k_mach_to_features (int); + +extern int bfd_m68k_features_to_mach (unsigned); + extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); + (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, + char **); + +extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs + (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, + char **); /* SunOS shared library support routines for the linker. */ @@ -709,7 +786,8 @@ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list extern bfd_boolean bfd_sunos_record_link_assignment (bfd *, struct bfd_link_info *, const char *); extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **); + (bfd *, struct bfd_link_info *, struct bfd_section **, + struct bfd_section **, struct bfd_section **); /* Linux shared library support routines for the linker. */ @@ -790,6 +868,27 @@ extern bfd_boolean bfd_coff_set_symbol_class extern bfd_boolean bfd_m68k_coff_create_embedded_relocs (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); +/* ARM VFP11 erratum workaround support. */ +typedef enum +{ + BFD_ARM_VFP11_FIX_DEFAULT, + BFD_ARM_VFP11_FIX_NONE, + BFD_ARM_VFP11_FIX_SCALAR, + BFD_ARM_VFP11_FIX_VECTOR +} bfd_arm_vfp11_fix; + +extern void bfd_elf32_arm_init_maps + (bfd *); + +extern void bfd_elf32_arm_set_vfp11_fix + (bfd *, struct bfd_link_info *); + +extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan + (bfd *, struct bfd_link_info *); + +extern void bfd_elf32_arm_vfp11_fix_veneer_locations + (bfd *, struct bfd_link_info *); + /* ARM Interworking support. Called from linker. */ extern bfd_boolean bfd_arm_allocate_interworking_sections (struct bfd_link_info *); @@ -815,7 +914,11 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info *); extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int, int); + (bfd *, struct bfd_link_info *); + +void bfd_elf32_arm_set_target_relocs + (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, + int, int); extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); @@ -823,6 +926,16 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); +/* ELF ARM mapping symbol support */ +#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) +#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) +#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) +#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) +extern bfd_boolean bfd_is_arm_special_symbol_name + (const char * name, int type); + +extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); + /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines (bfd *, bfd *); @@ -851,10 +964,33 @@ extern void bfd_elf32_ia64_after_parse extern void bfd_elf64_ia64_after_parse (int); +/* This structure is used for a comdat section, as in PE. A comdat + section is associated with a particular symbol. When the linker + sees a comdat section, it keeps only one of the sections with a + given name and associated with a given symbol. */ + +struct coff_comdat_info +{ + /* The name of the symbol associated with a comdat section. */ + const char *name; + + /* The local symbol table index of the symbol associated with a + comdat section. This is only meaningful to the object file format + specific code; it is not an index into the list returned by + bfd_canonicalize_symtab. */ + long symbol; +}; + +extern struct coff_comdat_info *bfd_coff_get_comdat_section + (bfd *, struct bfd_section *); + /* Extracted from init.c. */ void bfd_init (void); /* Extracted from opncls.c. */ +bfd *bfd_fopen (const char *filename, const char *target, + const char *mode, int fd); + bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); @@ -871,7 +1007,10 @@ bfd *bfd_openr_iovec (const char *filename, const char *target, file_ptr nbytes, file_ptr offset), int (*close) (struct bfd *nbfd, - void *stream)); + void *stream), + int (*stat) (struct bfd *abfd, + void *stream, + struct stat *sb)); bfd *bfd_openw (const char *filename, const char *target); @@ -1012,27 +1151,10 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section /* Extracted from bfdio.c. */ long bfd_get_mtime (bfd *abfd); -long bfd_get_size (bfd *abfd); +file_ptr bfd_get_size (bfd *abfd); /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ -/* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ - -struct bfd_comdat_info -{ - /* The name of the symbol associated with a comdat section. */ - const char *name; - - /* The local symbol table index of the symbol associated with a - comdat section. This is only meaningful to the object file format - specific code; it is not an index into the list returned by - bfd_canonicalize_symtab. */ - long symbol; -}; - typedef struct bfd_section { /* The name of the section; the name isn't a copy, the pointer is @@ -1048,6 +1170,9 @@ typedef struct bfd_section /* The next section in the list belonging to the BFD, or NULL. */ struct bfd_section *next; + /* The previous section in the list belonging to the BFD, or NULL. */ + struct bfd_section *prev; + /* The field flags contains attributes of the section. Some flags are read in from the object file, and some are synthesized from other information. */ @@ -1067,23 +1192,17 @@ typedef struct bfd_section some relocation information too. */ #define SEC_RELOC 0x004 - /* ELF reserves 4 processor specific bits and 8 operating system - specific bits in sh_flags; at present we can get away with just - one in communicating between the assembler and BFD, but this - isn't a good long-term solution. */ -#define SEC_ARCH_BIT_0 0x008 - /* A signal to the OS that the section contains read only data. */ -#define SEC_READONLY 0x010 +#define SEC_READONLY 0x008 /* The section contains code only. */ -#define SEC_CODE 0x020 +#define SEC_CODE 0x010 /* The section contains data only. */ -#define SEC_DATA 0x040 +#define SEC_DATA 0x020 /* The section will reside in ROM. */ -#define SEC_ROM 0x080 +#define SEC_ROM 0x040 /* The section contains constructor information. This section type is used by the linker to create lists of constructors and @@ -1095,30 +1214,19 @@ typedef struct bfd_section sections called <<__CTOR_LIST__>> and relocate the data contained within - exactly the operations it would peform on standard data. */ -#define SEC_CONSTRUCTOR 0x100 +#define SEC_CONSTRUCTOR 0x080 /* The section has contents - a data section could be <> | <>; a debug section could be <> */ -#define SEC_HAS_CONTENTS 0x200 +#define SEC_HAS_CONTENTS 0x100 /* An instruction to the linker to not output the section even if it has information which would normally be written. */ -#define SEC_NEVER_LOAD 0x400 - - /* The section is a COFF shared library section. This flag is - only for the linker. If this type of section appears in - the input file, the linker must copy it to the output file - without changing the vma or size. FIXME: Although this - was originally intended to be general, it really is COFF - specific (and the flag was renamed to indicate this). It - might be cleaner to have some more general mechanism to - allow the back end to control what the linker does with - sections. */ -#define SEC_COFF_SHARED_LIBRARY 0x800 +#define SEC_NEVER_LOAD 0x200 /* The section contains thread local data. */ -#define SEC_THREAD_LOCAL 0x1000 +#define SEC_THREAD_LOCAL 0x400 /* The section has GOT references. This flag is only for the linker, and is currently only used by the elf32-hppa back end. @@ -1126,46 +1234,46 @@ typedef struct bfd_section in this section, which indicate to the linker that the section contains PIC code, and must be handled specially when doing a static link. */ -#define SEC_HAS_GOT_REF 0x4000 +#define SEC_HAS_GOT_REF 0x800 /* The section contains common symbols (symbols may be defined multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we translate to bfd_com_section_ptr), but ECOFF has two. */ -#define SEC_IS_COMMON 0x8000 +#define SEC_IS_COMMON 0x1000 /* The section contains only debugging information. For example, this is set for ELF .debug and .stab sections. strip tests this flag to see if a section can be discarded. */ -#define SEC_DEBUGGING 0x10000 +#define SEC_DEBUGGING 0x2000 /* The contents of this section are held in memory pointed to by the contents field. This is checked by bfd_get_section_contents, and the data is retrieved from memory if appropriate. */ -#define SEC_IN_MEMORY 0x20000 +#define SEC_IN_MEMORY 0x4000 /* The contents of this section are to be excluded by the linker for executable and shared objects unless those objects are to be further relocated. */ -#define SEC_EXCLUDE 0x40000 +#define SEC_EXCLUDE 0x8000 /* The contents of this section are to be sorted based on the sum of the symbol and addend values specified by the associated relocation entries. Entries without associated relocation entries will be appended to the end of the section in an unspecified order. */ -#define SEC_SORT_ENTRIES 0x80000 +#define SEC_SORT_ENTRIES 0x10000 /* When linking, duplicate sections of the same name should be discarded, rather than being combined into a single section as is usually done. This is similar to how common symbols are handled. See SEC_LINK_DUPLICATES below. */ -#define SEC_LINK_ONCE 0x100000 +#define SEC_LINK_ONCE 0x20000 /* If SEC_LINK_ONCE is set, this bitfield describes how the linker should handle duplicate sections. */ -#define SEC_LINK_DUPLICATES 0x600000 +#define SEC_LINK_DUPLICATES 0x40000 /* This value for SEC_LINK_DUPLICATES means that duplicate sections with the same name should simply be discarded. */ @@ -1174,55 +1282,71 @@ typedef struct bfd_section /* This value for SEC_LINK_DUPLICATES means that the linker should warn if there are any duplicate sections, although it should still only link one copy. */ -#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000 +#define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections are a different size. */ -#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000 +#define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000 /* This value for SEC_LINK_DUPLICATES means that the linker should warn if any duplicate sections contain different contents. */ -#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000 +#define SEC_LINK_DUPLICATES_SAME_CONTENTS \ + (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE) /* This section was created by the linker as part of dynamic relocation or other arcane processing. It is skipped when going through the first-pass output, trusting that someone else up the line will take care of it later. */ -#define SEC_LINKER_CREATED 0x800000 +#define SEC_LINKER_CREATED 0x200000 - /* This section should not be subject to garbage collection. */ -#define SEC_KEEP 0x1000000 + /* This section should not be subject to garbage collection. + Also set to inform the linker that this section should not be + listed in the link map as discarded. */ +#define SEC_KEEP 0x400000 /* This section contains "short" data, and should be placed "near" the GP. */ -#define SEC_SMALL_DATA 0x2000000 - - /* This section contains data which may be shared with other - executables or shared objects. */ -#define SEC_SHARED 0x4000000 - - /* When a section with this flag is being linked, then if the size of - the input section is less than a page, it should not cross a page - boundary. If the size of the input section is one page or more, it - should be aligned on a page boundary. */ -#define SEC_BLOCK 0x8000000 - - /* Conditionally link this section; do not link if there are no - references found to any symbol in the section. */ -#define SEC_CLINK 0x10000000 +#define SEC_SMALL_DATA 0x800000 /* Attempt to merge identical entities in the section. Entity size is given in the entsize field. */ -#define SEC_MERGE 0x20000000 +#define SEC_MERGE 0x1000000 /* If given with SEC_MERGE, entities to merge are zero terminated strings where entsize specifies character size instead of fixed size entries. */ -#define SEC_STRINGS 0x40000000 +#define SEC_STRINGS 0x2000000 /* This section contains data about section groups. */ -#define SEC_GROUP 0x80000000 +#define SEC_GROUP 0x4000000 + + /* The section is a COFF shared library section. This flag is + only for the linker. If this type of section appears in + the input file, the linker must copy it to the output file + without changing the vma or size. FIXME: Although this + was originally intended to be general, it really is COFF + specific (and the flag was renamed to indicate this). It + might be cleaner to have some more general mechanism to + allow the back end to control what the linker does with + sections. */ +#define SEC_COFF_SHARED_LIBRARY 0x10000000 + + /* This section contains data which may be shared with other + executables or shared objects. This is for COFF only. */ +#define SEC_COFF_SHARED 0x20000000 + + /* When a section with this flag is being linked, then if the size of + the input section is less than a page, it should not cross a page + boundary. If the size of the input section is one page or more, + it should be aligned on a page boundary. This is for TI + TMS320C54X only. */ +#define SEC_TIC54X_BLOCK 0x40000000 + + /* Conditionally link this section; do not link if there are no + references found to any symbol in the section. This is for TI + TMS320C54X only. */ +#define SEC_TIC54X_CLINK 0x80000000 /* End of section flags. */ @@ -1238,8 +1362,9 @@ typedef struct bfd_section output sections that have an input section. */ unsigned int linker_has_input : 1; - /* A mark flag used by some linker backends for garbage collection. */ + /* Mark flags used by some linker backends for garbage collection. */ unsigned int gc_mark : 1; + unsigned int gc_mark_from_eh : 1; /* The following flags are used by the ELF linker. */ @@ -1257,7 +1382,8 @@ typedef struct bfd_section /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; - /* Bits used by various backends. */ + /* Bits used by various backends. The generic code doesn't touch + these fields. */ /* Nonzero if this section has TLS related relocations. */ unsigned int has_tls_reloc:1; @@ -1356,9 +1482,6 @@ typedef struct bfd_section /* Entity size for merging purposes. */ unsigned int entsize; - /* Optional information about a COMDAT entry; NULL if not COMDAT. */ - struct bfd_comdat_info *comdat; - /* Points to the kept section if this section is a link-once section, and is discarded. */ struct bfd_section *kept_section; @@ -1383,8 +1506,14 @@ typedef struct bfd_section struct bfd_symbol *symbol; struct bfd_symbol **symbol_ptr_ptr; - struct bfd_link_order *link_order_head; - struct bfd_link_order *link_order_tail; + /* Early in the link process, map_head and map_tail are used to build + a list of input sections attached to an output section. Later, + output sections use these fields for a list of bfd_link_order + structs. */ + union { + struct bfd_link_order *link_order; + struct bfd_section *s; + } map_head, map_tail; } asection; /* These sections are global, and are managed by BFD. The application @@ -1419,35 +1548,133 @@ extern asection bfd_ind_section; || ((SEC) == bfd_com_section_ptr) \ || ((SEC) == bfd_ind_section_ptr)) -extern const struct bfd_symbol * const bfd_abs_symbol; -extern const struct bfd_symbol * const bfd_com_symbol; -extern const struct bfd_symbol * const bfd_und_symbol; -extern const struct bfd_symbol * const bfd_ind_symbol; - /* Macros to handle insertion and deletion of a bfd's sections. These only handle the list pointers, ie. do not adjust section_count, target_index etc. */ -#define bfd_section_list_remove(ABFD, PS) \ +#define bfd_section_list_remove(ABFD, S) \ + do \ + { \ + asection *_s = S; \ + asection *_next = _s->next; \ + asection *_prev = _s->prev; \ + if (_prev) \ + _prev->next = _next; \ + else \ + (ABFD)->sections = _next; \ + if (_next) \ + _next->prev = _prev; \ + else \ + (ABFD)->section_last = _prev; \ + } \ + while (0) +#define bfd_section_list_append(ABFD, S) \ + do \ + { \ + asection *_s = S; \ + bfd *_abfd = ABFD; \ + _s->next = NULL; \ + if (_abfd->section_last) \ + { \ + _s->prev = _abfd->section_last; \ + _abfd->section_last->next = _s; \ + } \ + else \ + { \ + _s->prev = NULL; \ + _abfd->sections = _s; \ + } \ + _abfd->section_last = _s; \ + } \ + while (0) +#define bfd_section_list_prepend(ABFD, S) \ do \ { \ - asection **_ps = PS; \ - asection *_s = *_ps; \ - *_ps = _s->next; \ - if (_s->next == NULL) \ - (ABFD)->section_tail = _ps; \ + asection *_s = S; \ + bfd *_abfd = ABFD; \ + _s->prev = NULL; \ + if (_abfd->sections) \ + { \ + _s->next = _abfd->sections; \ + _abfd->sections->prev = _s; \ + } \ + else \ + { \ + _s->next = NULL; \ + _abfd->section_last = _s; \ + } \ + _abfd->sections = _s; \ } \ while (0) -#define bfd_section_list_insert(ABFD, PS, S) \ +#define bfd_section_list_insert_after(ABFD, A, S) \ do \ { \ - asection **_ps = PS; \ + asection *_a = A; \ asection *_s = S; \ - _s->next = *_ps; \ - *_ps = _s; \ - if (_s->next == NULL) \ - (ABFD)->section_tail = &_s->next; \ + asection *_next = _a->next; \ + _s->next = _next; \ + _s->prev = _a; \ + _a->next = _s; \ + if (_next) \ + _next->prev = _s; \ + else \ + (ABFD)->section_last = _s; \ } \ while (0) +#define bfd_section_list_insert_before(ABFD, B, S) \ + do \ + { \ + asection *_b = B; \ + asection *_s = S; \ + asection *_prev = _b->prev; \ + _s->prev = _prev; \ + _s->next = _b; \ + _b->prev = _s; \ + if (_prev) \ + _prev->next = _s; \ + else \ + (ABFD)->sections = _s; \ + } \ + while (0) +#define bfd_section_removed_from_list(ABFD, S) \ + ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S)) + +#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ + /* name, id, index, next, prev, flags, user_set_vma, */ \ + { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ + \ + /* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh, */ \ + 0, 0, 1, 0, \ + \ + /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \ + 0, 0, 0, 0, \ + \ + /* has_gp_reloc, need_finalize_relax, reloc_done, */ \ + 0, 0, 0, \ + \ + /* vma, lma, size, rawsize */ \ + 0, 0, 0, 0, \ + \ + /* output_offset, output_section, alignment_power, */ \ + 0, (struct bfd_section *) &SEC, 0, \ + \ + /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \ + NULL, NULL, 0, 0, 0, \ + \ + /* line_filepos, userdata, contents, lineno, lineno_count, */ \ + 0, NULL, NULL, NULL, 0, \ + \ + /* entsize, kept_section, moving_line_filepos, */ \ + 0, NULL, 0, \ + \ + /* target_index, used_by_bfd, constructor_chain, owner, */ \ + 0, NULL, NULL, NULL, \ + \ + /* symbol, symbol_ptr_ptr, */ \ + (struct bfd_symbol *) SYM, &SEC.symbol, \ + \ + /* map_head, map_tail */ \ + { NULL }, { NULL } \ + } void bfd_section_list_clear (bfd *); @@ -1464,8 +1691,14 @@ char *bfd_get_unique_section_name asection *bfd_make_section_old_way (bfd *abfd, const char *name); +asection *bfd_make_section_anyway_with_flags + (bfd *abfd, const char *name, flagword flags); + asection *bfd_make_section_anyway (bfd *abfd, const char *name); +asection *bfd_make_section_with_flags + (bfd *, const char *name, flagword flags); + asection *bfd_make_section (bfd *, const char *name); bfd_boolean bfd_set_section_flags @@ -1478,7 +1711,7 @@ void bfd_map_over_sections asection *bfd_sections_find_if (bfd *abfd, - bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj), + bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); bfd_boolean bfd_set_section_size @@ -1501,9 +1734,6 @@ bfd_boolean bfd_copy_private_section_data #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ BFD_SEND (obfd, _bfd_copy_private_section_data, \ (ibfd, isection, obfd, osection)) -void _bfd_strip_section_from_output - (struct bfd_link_info *info, asection *section); - bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); @@ -1522,16 +1752,26 @@ enum bfd_architecture #define bfd_mach_m68040 6 #define bfd_mach_m68060 7 #define bfd_mach_cpu32 8 -#define bfd_mach_mcf5200 9 -#define bfd_mach_mcf5206e 10 -#define bfd_mach_mcf5307 11 -#define bfd_mach_mcf5407 12 -#define bfd_mach_mcf528x 13 -#define bfd_mach_mcfv4e 14 -#define bfd_mach_mcf521x 15 -#define bfd_mach_mcf5249 16 -#define bfd_mach_mcf547x 17 -#define bfd_mach_mcf548x 18 +#define bfd_mach_fido 9 +#define bfd_mach_mcf_isa_a_nodiv 10 +#define bfd_mach_mcf_isa_a 11 +#define bfd_mach_mcf_isa_a_mac 12 +#define bfd_mach_mcf_isa_a_emac 13 +#define bfd_mach_mcf_isa_aplus 14 +#define bfd_mach_mcf_isa_aplus_mac 15 +#define bfd_mach_mcf_isa_aplus_emac 16 +#define bfd_mach_mcf_isa_b_nousp 17 +#define bfd_mach_mcf_isa_b_nousp_mac 18 +#define bfd_mach_mcf_isa_b_nousp_emac 19 +#define bfd_mach_mcf_isa_b 20 +#define bfd_mach_mcf_isa_b_mac 21 +#define bfd_mach_mcf_isa_b_emac 22 +#define bfd_mach_mcf_isa_b_float 23 +#define bfd_mach_mcf_isa_b_float_mac 24 +#define bfd_mach_mcf_isa_b_float_emac 25 +#define bfd_mach_mcf_isa_c 26 +#define bfd_mach_mcf_isa_c_mac 27 +#define bfd_mach_mcf_isa_c_emac 28 bfd_arch_vax, /* DEC Vax */ bfd_arch_i960, /* Intel 960 */ /* The order of the following is important. @@ -1553,7 +1793,6 @@ enum bfd_architecture bfd_arch_or32, /* OpenRISC 32 */ - bfd_arch_a29k, /* AMD 29000 */ bfd_arch_sparc, /* SPARC */ #define bfd_mach_sparc 1 /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ @@ -1570,6 +1809,11 @@ enum bfd_architecture #define bfd_mach_sparc_v9_p(mach) \ ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ && (mach) != bfd_mach_sparc_sparclite_le) +/* Nonzero if MACH is a 64 bit sparc architecture. */ +#define bfd_mach_sparc_64bit_p(mach) \ + ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb) + bfd_arch_spu, /* PowerPC SPU */ +#define bfd_mach_spu 256 bfd_arch_mips, /* MIPS Rxxxx */ #define bfd_mach_mips3000 3000 #define bfd_mach_mips3900 3900 @@ -1588,6 +1832,7 @@ enum bfd_architecture #define bfd_mach_mips6000 6000 #define bfd_mach_mips7000 7000 #define bfd_mach_mips8000 8000 +#define bfd_mach_mips9000 9000 #define bfd_mach_mips10000 10000 #define bfd_mach_mips12000 12000 #define bfd_mach_mips16 16 @@ -1608,7 +1853,6 @@ enum bfd_architecture bfd_arch_i860, /* Intel 860 */ bfd_arch_i370, /* IBM 360/370 Mainframes */ bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_alliant, /* Alliant */ bfd_arch_convex, /* Convex */ bfd_arch_m88k, /* Motorola 88xxx */ bfd_arch_m98k, /* Motorola 98xxx */ @@ -1671,6 +1915,12 @@ enum bfd_architecture #define bfd_mach_sh 1 #define bfd_mach_sh2 0x20 #define bfd_mach_sh_dsp 0x2d +#define bfd_mach_sh2a 0x2a +#define bfd_mach_sh2a_nofpu 0x2b +#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1 +#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2 +#define bfd_mach_sh2a_or_sh4 0x2a3 +#define bfd_mach_sh2a_or_sh3e 0x2a4 #define bfd_mach_sh2e 0x2e #define bfd_mach_sh3 0x30 #define bfd_mach_sh3_nommu 0x31 @@ -1701,6 +1951,7 @@ enum bfd_architecture #define bfd_mach_arm_XScale 10 #define bfd_mach_arm_ep9312 11 #define bfd_mach_arm_iWMMXt 12 +#define bfd_mach_arm_iWMMXt2 13 bfd_arch_ns32k, /* National Semiconductors ns32000 */ bfd_arch_w65, /* WDC 65816 */ bfd_arch_tic30, /* Texas Instruments TMS320C30 */ @@ -1718,6 +1969,9 @@ enum bfd_architecture #define bfd_mach_arc_6 6 #define bfd_mach_arc_7 7 #define bfd_mach_arc_8 8 + bfd_arch_m32c, /* Renesas M16C/M32C. */ +#define bfd_mach_m16c 0x75 +#define bfd_mach_m32c 0x78 bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */ #define bfd_mach_m32r 1 /* For backwards compatibility. */ #define bfd_mach_m32rx 'x' @@ -1739,6 +1993,9 @@ enum bfd_architecture #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 bfd_arch_mcore, + bfd_arch_mep, +#define bfd_mach_mep 1 +#define bfd_mach_mep_h1 0x6831 bfd_arch_ia64, /* HP/Intel ia64 */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 @@ -1748,6 +2005,10 @@ enum bfd_architecture bfd_arch_iq2000, /* Vitesse IQ2000. */ #define bfd_mach_iq2000 1 #define bfd_mach_iq10 2 + bfd_arch_mt, +#define bfd_mach_ms1 1 +#define bfd_mach_mrisc2 2 +#define bfd_mach_ms2 3 bfd_arch_pj, bfd_arch_avr, /* Atmel AVR microcontrollers. */ #define bfd_mach_avr1 1 @@ -1755,14 +2016,23 @@ enum bfd_architecture #define bfd_mach_avr3 3 #define bfd_mach_avr4 4 #define bfd_mach_avr5 5 +#define bfd_mach_avr6 6 + bfd_arch_bfin, /* ADI Blackfin */ +#define bfd_mach_bfin 1 + bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */ +#define bfd_mach_cr16 1 bfd_arch_cr16c, /* National Semiconductor CompactRISC. */ #define bfd_mach_cr16c 1 - bfd_arch_crx, /* National Semiconductor CRX. */ + bfd_arch_crx, /* National Semiconductor CRX. */ #define bfd_mach_crx 1 bfd_arch_cris, /* Axis CRIS */ +#define bfd_mach_cris_v0_v10 255 +#define bfd_mach_cris_v32 32 +#define bfd_mach_cris_v10_v32 1032 bfd_arch_s390, /* IBM s390 */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 + bfd_arch_score, /* Sunplus score */ bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, @@ -1774,7 +2044,8 @@ enum bfd_architecture #define bfd_mach_msp13 13 #define bfd_mach_msp14 14 #define bfd_mach_msp15 15 -#define bfd_mach_msp16 16 +#define bfd_mach_msp16 16 +#define bfd_mach_msp21 21 #define bfd_mach_msp31 31 #define bfd_mach_msp32 32 #define bfd_mach_msp33 33 @@ -1782,8 +2053,20 @@ enum bfd_architecture #define bfd_mach_msp42 42 #define bfd_mach_msp43 43 #define bfd_mach_msp44 44 + bfd_arch_xc16x, /* Infineon's XC16X Series. */ +#define bfd_mach_xc16x 1 +#define bfd_mach_xc16xl 2 +#define bfd_mach_xc16xs 3 bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 + bfd_arch_maxq, /* Dallas MAXQ 10/20 */ +#define bfd_mach_maxq10 10 +#define bfd_mach_maxq20 20 + bfd_arch_z80, +#define bfd_mach_z80strict 1 /* No undocumented opcodes. */ +#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */ +#define bfd_mach_z80full 7 /* All undocumented instructions. */ +#define bfd_mach_r800 11 /* R800: successor with multiplication. */ bfd_arch_last }; @@ -1897,11 +2180,12 @@ enum complain_overflow /* Do not complain on overflow. */ complain_overflow_dont, - /* Complain if the bitfield overflows, whether it is considered - as signed or unsigned. */ + /* Complain if the value overflows when considered as a signed + number one bit larger than the field. ie. A bitfield of N bits + is allowed to represent -2**n to 2**n-1. */ complain_overflow_bitfield, - /* Complain if the value overflows when considered as signed + /* Complain if the value overflows when considered as a signed number. */ complain_overflow_signed, @@ -2226,6 +2510,22 @@ relocation types already defined. */ BFD_RELOC_SPARC_TLS_TPOFF32, BFD_RELOC_SPARC_TLS_TPOFF64, +/* SPU Relocations. */ + BFD_RELOC_SPU_IMM7, + BFD_RELOC_SPU_IMM8, + BFD_RELOC_SPU_IMM10, + BFD_RELOC_SPU_IMM10W, + BFD_RELOC_SPU_IMM16, + BFD_RELOC_SPU_IMM16W, + BFD_RELOC_SPU_IMM18, + BFD_RELOC_SPU_PCREL9a, + BFD_RELOC_SPU_PCREL9b, + BFD_RELOC_SPU_PCREL16, + BFD_RELOC_SPU_LO16, + BFD_RELOC_SPU_HI16, + BFD_RELOC_SPU_PPU32, + BFD_RELOC_SPU_PPU64, + /* Alpha ECOFF and ELF relocations. Some of these treat the symbol or "addend" in some special way. For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when @@ -2332,6 +2632,27 @@ to compensate for the borrow when the low bits are added. */ /* Low 16 bits. */ BFD_RELOC_LO16, +/* High 16 bits of 32-bit pc-relative value */ + BFD_RELOC_HI16_PCREL, + +/* High 16 bits of 32-bit pc-relative value, adjusted */ + BFD_RELOC_HI16_S_PCREL, + +/* Low 16 bits of pc-relative value */ + BFD_RELOC_LO16_PCREL, + +/* MIPS16 high 16 bits of 32-bit value. */ + BFD_RELOC_MIPS16_HI16, + +/* MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign +extended and added to form the final result. If the low 16 +bits form a negative number, we need to add one to the high value +to compensate for the borrow when the low bits are added. */ + BFD_RELOC_MIPS16_HI16_S, + +/* MIPS16 low 16 bits. */ + BFD_RELOC_MIPS16_LO16, + /* Relocation against a MIPS literal section. */ BFD_RELOC_MIPS_LITERAL, @@ -2357,6 +2678,24 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MIPS_REL16, BFD_RELOC_MIPS_RELGOT, BFD_RELOC_MIPS_JALR, + BFD_RELOC_MIPS_TLS_DTPMOD32, + BFD_RELOC_MIPS_TLS_DTPREL32, + BFD_RELOC_MIPS_TLS_DTPMOD64, + BFD_RELOC_MIPS_TLS_DTPREL64, + BFD_RELOC_MIPS_TLS_GD, + BFD_RELOC_MIPS_TLS_LDM, + BFD_RELOC_MIPS_TLS_DTPREL_HI16, + BFD_RELOC_MIPS_TLS_DTPREL_LO16, + BFD_RELOC_MIPS_TLS_GOTTPREL, + BFD_RELOC_MIPS_TLS_TPREL32, + BFD_RELOC_MIPS_TLS_TPREL64, + BFD_RELOC_MIPS_TLS_TPREL_HI16, + BFD_RELOC_MIPS_TLS_TPREL_LO16, + + +/* MIPS ELF relocations (VxWorks extensions). */ + BFD_RELOC_MIPS_COPY, + BFD_RELOC_MIPS_JUMP_SLOT, /* Fujitsu Frv Relocations. */ @@ -2383,6 +2722,22 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_FRV_GOTOFF12, BFD_RELOC_FRV_GOTOFFHI, BFD_RELOC_FRV_GOTOFFLO, + BFD_RELOC_FRV_GETTLSOFF, + BFD_RELOC_FRV_TLSDESC_VALUE, + BFD_RELOC_FRV_GOTTLSDESC12, + BFD_RELOC_FRV_GOTTLSDESCHI, + BFD_RELOC_FRV_GOTTLSDESCLO, + BFD_RELOC_FRV_TLSMOFF12, + BFD_RELOC_FRV_TLSMOFFHI, + BFD_RELOC_FRV_TLSMOFFLO, + BFD_RELOC_FRV_GOTTLSOFF12, + BFD_RELOC_FRV_GOTTLSOFFHI, + BFD_RELOC_FRV_GOTTLSOFFLO, + BFD_RELOC_FRV_TLSOFF, + BFD_RELOC_FRV_TLSDESC_RELAX, + BFD_RELOC_FRV_GETTLSOFF_RELAX, + BFD_RELOC_FRV_TLSOFF_RELAX, + BFD_RELOC_FRV_TLSMOFF, /* This is a 24bit GOT-relative reloc for the mn10300. */ @@ -2434,6 +2789,9 @@ in the instruction. */ BFD_RELOC_386_TLS_DTPMOD32, BFD_RELOC_386_TLS_DTPOFF32, BFD_RELOC_386_TLS_TPOFF32, + BFD_RELOC_386_TLS_GOTDESC, + BFD_RELOC_386_TLS_DESC_CALL, + BFD_RELOC_386_TLS_DESC, /* x86-64/elf relocations */ BFD_RELOC_X86_64_GOT32, @@ -2452,6 +2810,16 @@ in the instruction. */ BFD_RELOC_X86_64_DTPOFF32, BFD_RELOC_X86_64_GOTTPOFF, BFD_RELOC_X86_64_TPOFF32, + BFD_RELOC_X86_64_GOTOFF64, + BFD_RELOC_X86_64_GOTPC32, + BFD_RELOC_X86_64_GOT64, + BFD_RELOC_X86_64_GOTPCREL64, + BFD_RELOC_X86_64_GOTPC64, + BFD_RELOC_X86_64_GOTPLT64, + BFD_RELOC_X86_64_PLTOFF64, + BFD_RELOC_X86_64_GOTPC32_TLSDESC, + BFD_RELOC_X86_64_TLSDESC_CALL, + BFD_RELOC_X86_64_TLSDESC, /* ns32k relocations */ BFD_RELOC_NS32K_IMM_8, @@ -2598,39 +2966,146 @@ not stored in the instruction. The 2nd lowest bit comes from a 1 bit field in the instruction. */ BFD_RELOC_THUMB_PCREL_BLX, +/* ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction. */ + BFD_RELOC_ARM_PCREL_CALL, + +/* ARM 26-bit pc-relative branch for B or conditional BL instruction. */ + BFD_RELOC_ARM_PCREL_JUMP, + +/* Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches. +The lowest bit must be zero and is not stored in the instruction. +Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an +"nn" one smaller in all cases. Note further that BRANCH23 +corresponds to R_ARM_THM_CALL. */ + BFD_RELOC_THUMB_PCREL_BRANCH7, + BFD_RELOC_THUMB_PCREL_BRANCH9, + BFD_RELOC_THUMB_PCREL_BRANCH12, + BFD_RELOC_THUMB_PCREL_BRANCH20, + BFD_RELOC_THUMB_PCREL_BRANCH23, + BFD_RELOC_THUMB_PCREL_BRANCH25, + +/* 12-bit immediate offset, used in ARM-format ldr and str instructions. */ + BFD_RELOC_ARM_OFFSET_IMM, + +/* 5-bit immediate offset, used in Thumb-format ldr and str instructions. */ + BFD_RELOC_ARM_THUMB_OFFSET, + +/* Pc-relative or absolute relocation depending on target. Used for +entries in .init_array sections. */ + BFD_RELOC_ARM_TARGET1, + +/* Read-only segment base relative address. */ + BFD_RELOC_ARM_ROSEGREL32, + +/* Data segment base relative address. */ + BFD_RELOC_ARM_SBREL32, + +/* This reloc is used for references to RTTI data from exception handling +tables. The actual definition depends on the target. It may be a +pc-relative or some form of GOT-indirect relocation. */ + BFD_RELOC_ARM_TARGET2, + +/* 31-bit PC relative address. */ + BFD_RELOC_ARM_PREL31, + +/* Low and High halfword relocations for MOVW and MOVT instructions. */ + BFD_RELOC_ARM_MOVW, + BFD_RELOC_ARM_MOVT, + BFD_RELOC_ARM_MOVW_PCREL, + BFD_RELOC_ARM_MOVT_PCREL, + BFD_RELOC_ARM_THUMB_MOVW, + BFD_RELOC_ARM_THUMB_MOVT, + BFD_RELOC_ARM_THUMB_MOVW_PCREL, + BFD_RELOC_ARM_THUMB_MOVT_PCREL, + +/* Relocations for setting up GOTs and PLTs for shared libraries. */ + BFD_RELOC_ARM_JUMP_SLOT, + BFD_RELOC_ARM_GLOB_DAT, + BFD_RELOC_ARM_GOT32, + BFD_RELOC_ARM_PLT32, + BFD_RELOC_ARM_RELATIVE, + BFD_RELOC_ARM_GOTOFF, + BFD_RELOC_ARM_GOTPC, + +/* ARM thread-local storage relocations. */ + BFD_RELOC_ARM_TLS_GD32, + BFD_RELOC_ARM_TLS_LDO32, + BFD_RELOC_ARM_TLS_LDM32, + BFD_RELOC_ARM_TLS_DTPOFF32, + BFD_RELOC_ARM_TLS_DTPMOD32, + BFD_RELOC_ARM_TLS_TPOFF32, + BFD_RELOC_ARM_TLS_IE32, + BFD_RELOC_ARM_TLS_LE32, + +/* ARM group relocations. */ + BFD_RELOC_ARM_ALU_PC_G0_NC, + BFD_RELOC_ARM_ALU_PC_G0, + BFD_RELOC_ARM_ALU_PC_G1_NC, + BFD_RELOC_ARM_ALU_PC_G1, + BFD_RELOC_ARM_ALU_PC_G2, + BFD_RELOC_ARM_LDR_PC_G0, + BFD_RELOC_ARM_LDR_PC_G1, + BFD_RELOC_ARM_LDR_PC_G2, + BFD_RELOC_ARM_LDRS_PC_G0, + BFD_RELOC_ARM_LDRS_PC_G1, + BFD_RELOC_ARM_LDRS_PC_G2, + BFD_RELOC_ARM_LDC_PC_G0, + BFD_RELOC_ARM_LDC_PC_G1, + BFD_RELOC_ARM_LDC_PC_G2, + BFD_RELOC_ARM_ALU_SB_G0_NC, + BFD_RELOC_ARM_ALU_SB_G0, + BFD_RELOC_ARM_ALU_SB_G1_NC, + BFD_RELOC_ARM_ALU_SB_G1, + BFD_RELOC_ARM_ALU_SB_G2, + BFD_RELOC_ARM_LDR_SB_G0, + BFD_RELOC_ARM_LDR_SB_G1, + BFD_RELOC_ARM_LDR_SB_G2, + BFD_RELOC_ARM_LDRS_SB_G0, + BFD_RELOC_ARM_LDRS_SB_G1, + BFD_RELOC_ARM_LDRS_SB_G2, + BFD_RELOC_ARM_LDC_SB_G0, + BFD_RELOC_ARM_LDC_SB_G1, + BFD_RELOC_ARM_LDC_SB_G2, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, BFD_RELOC_ARM_ADRL_IMMEDIATE, - BFD_RELOC_ARM_OFFSET_IMM, + BFD_RELOC_ARM_T32_IMMEDIATE, + BFD_RELOC_ARM_T32_ADD_IMM, + BFD_RELOC_ARM_T32_IMM12, + BFD_RELOC_ARM_T32_ADD_PC12, BFD_RELOC_ARM_SHIFT_IMM, + BFD_RELOC_ARM_SMC, BFD_RELOC_ARM_SWI, BFD_RELOC_ARM_MULTI, BFD_RELOC_ARM_CP_OFF_IMM, BFD_RELOC_ARM_CP_OFF_IMM_S2, + BFD_RELOC_ARM_T32_CP_OFF_IMM, + BFD_RELOC_ARM_T32_CP_OFF_IMM_S2, BFD_RELOC_ARM_ADR_IMM, BFD_RELOC_ARM_LDR_IMM, BFD_RELOC_ARM_LITERAL, BFD_RELOC_ARM_IN_POOL, BFD_RELOC_ARM_OFFSET_IMM8, + BFD_RELOC_ARM_T32_OFFSET_U8, + BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_HWLITERAL, BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM, BFD_RELOC_ARM_THUMB_SHIFT, - BFD_RELOC_ARM_THUMB_OFFSET, - BFD_RELOC_ARM_GOT12, - BFD_RELOC_ARM_GOT32, - BFD_RELOC_ARM_JUMP_SLOT, - BFD_RELOC_ARM_COPY, - BFD_RELOC_ARM_GLOB_DAT, - BFD_RELOC_ARM_PLT32, - BFD_RELOC_ARM_RELATIVE, - BFD_RELOC_ARM_GOTOFF, - BFD_RELOC_ARM_GOTPC, /* Renesas / SuperH SH relocs. Not all of these appear in object files. */ BFD_RELOC_SH_PCDISP8BY2, BFD_RELOC_SH_PCDISP12BY2, + BFD_RELOC_SH_IMM3, + BFD_RELOC_SH_IMM3U, + BFD_RELOC_SH_DISP12, + BFD_RELOC_SH_DISP12BY2, + BFD_RELOC_SH_DISP12BY4, + BFD_RELOC_SH_DISP12BY8, + BFD_RELOC_SH_DISP20, + BFD_RELOC_SH_DISP20BY8, BFD_RELOC_SH_IMM4, BFD_RELOC_SH_IMM4BY2, BFD_RELOC_SH_IMM4BY4, @@ -2712,12 +3187,6 @@ field in the instruction. */ BFD_RELOC_SH_TLS_DTPOFF32, BFD_RELOC_SH_TLS_TPOFF32, -/* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must -be zero and is not stored in the instruction. */ - BFD_RELOC_THUMB_PCREL_BRANCH9, - BFD_RELOC_THUMB_PCREL_BRANCH12, - BFD_RELOC_THUMB_PCREL_BRANCH23, - /* ARC Cores relocs. ARC 22 bit pc-relative branch. The lowest two bits must be zero and are not stored in the instruction. The high 20 bits are installed in bits 26 @@ -2729,6 +3198,121 @@ stored in the instruction. The high 24 bits are installed in bits 23 through 0. */ BFD_RELOC_ARC_B26, +/* ADI Blackfin 16 bit immediate absolute reloc. */ + BFD_RELOC_BFIN_16_IMM, + +/* ADI Blackfin 16 bit immediate absolute reloc higher 16 bits. */ + BFD_RELOC_BFIN_16_HIGH, + +/* ADI Blackfin 'a' part of LSETUP. */ + BFD_RELOC_BFIN_4_PCREL, + +/* ADI Blackfin. */ + BFD_RELOC_BFIN_5_PCREL, + +/* ADI Blackfin 16 bit immediate absolute reloc lower 16 bits. */ + BFD_RELOC_BFIN_16_LOW, + +/* ADI Blackfin. */ + BFD_RELOC_BFIN_10_PCREL, + +/* ADI Blackfin 'b' part of LSETUP. */ + BFD_RELOC_BFIN_11_PCREL, + +/* ADI Blackfin. */ + BFD_RELOC_BFIN_12_PCREL_JUMP, + +/* ADI Blackfin Short jump, pcrel. */ + BFD_RELOC_BFIN_12_PCREL_JUMP_S, + +/* ADI Blackfin Call.x not implemented. */ + BFD_RELOC_BFIN_24_PCREL_CALL_X, + +/* ADI Blackfin Long Jump pcrel. */ + BFD_RELOC_BFIN_24_PCREL_JUMP_L, + +/* ADI Blackfin FD-PIC relocations. */ + BFD_RELOC_BFIN_GOT17M4, + BFD_RELOC_BFIN_GOTHI, + BFD_RELOC_BFIN_GOTLO, + BFD_RELOC_BFIN_FUNCDESC, + BFD_RELOC_BFIN_FUNCDESC_GOT17M4, + BFD_RELOC_BFIN_FUNCDESC_GOTHI, + BFD_RELOC_BFIN_FUNCDESC_GOTLO, + BFD_RELOC_BFIN_FUNCDESC_VALUE, + BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, + BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI, + BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, + BFD_RELOC_BFIN_GOTOFF17M4, + BFD_RELOC_BFIN_GOTOFFHI, + BFD_RELOC_BFIN_GOTOFFLO, + +/* ADI Blackfin GOT relocation. */ + BFD_RELOC_BFIN_GOT, + +/* ADI Blackfin PLTPC relocation. */ + BFD_RELOC_BFIN_PLTPC, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_PUSH, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_CONST, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_ADD, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_SUB, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_MULT, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_DIV, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_MOD, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LSHIFT, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_RSHIFT, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_AND, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_OR, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_XOR, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LAND, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LOR, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_LEN, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_NEG, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_COMP, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_PAGE, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_HWPAGE, + +/* ADI Blackfin arithmetic relocation. */ + BFD_ARELOC_BFIN_ADDR, + /* Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2 bits assumed to be 0. */ @@ -2806,6 +3390,12 @@ of the container. */ /* DLX relocs */ BFD_RELOC_DLX_JMP26, +/* Renesas M16C/M32C Relocations. */ + BFD_RELOC_M32C_HI8, + BFD_RELOC_M32C_RL_JUMP, + BFD_RELOC_M32C_RL_1ADDR, + BFD_RELOC_M32C_RL_2ADDR, + /* Renesas M32R (formerly Mitsubishi M32R) relocs. This is a 24 bit absolute address. */ BFD_RELOC_M32R_24, @@ -2917,6 +3507,10 @@ bits placed non-contiguously in the instruction. */ /* Used to maintain alignment whilst relaxing. */ BFD_RELOC_V850_ALIGN, +/* This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu +instructions. */ + BFD_RELOC_V850_LO16_SPLIT_OFFSET, + /* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the instruction. */ BFD_RELOC_MN10300_32_PCREL, @@ -2992,6 +3586,29 @@ short offset into 11 bits. */ BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2, BFD_RELOC_MCORE_RVA, +/* Toshiba Media Processor Relocations. */ + BFD_RELOC_MEP_8, + BFD_RELOC_MEP_16, + BFD_RELOC_MEP_32, + BFD_RELOC_MEP_PCREL8A2, + BFD_RELOC_MEP_PCREL12A2, + BFD_RELOC_MEP_PCREL17A2, + BFD_RELOC_MEP_PCREL24A2, + BFD_RELOC_MEP_PCABS24A2, + BFD_RELOC_MEP_LOW16, + BFD_RELOC_MEP_HI16U, + BFD_RELOC_MEP_HI16S, + BFD_RELOC_MEP_GPREL, + BFD_RELOC_MEP_TPREL, + BFD_RELOC_MEP_TPREL7, + BFD_RELOC_MEP_TPREL7A2, + BFD_RELOC_MEP_TPREL7A4, + BFD_RELOC_MEP_UIMM24, + BFD_RELOC_MEP_ADDR24A4, + BFD_RELOC_MEP_GNU_VTINHERIT, + BFD_RELOC_MEP_GNU_VTENTRY, + + /* These are relocations for the GETA instruction. */ BFD_RELOC_MMIX_GETA, BFD_RELOC_MMIX_GETA_1, @@ -3065,6 +3682,10 @@ of data memory address) into 8 bit immediate value of LDI insn. */ of program memory address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_HH8_LDI, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit +of 32 bit value) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_MS8_LDI, + /* This is a 16 bit reloc for the AVR that stores negated 8 bit value (usually data memory address) into 8 bit immediate value of SUBI insn. */ BFD_RELOC_AVR_LO8_LDI_NEG, @@ -3079,14 +3700,30 @@ SUBI insn. */ of LDI or SUBI insn. */ BFD_RELOC_AVR_HH8_LDI_NEG, +/* This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb +of 32 bit value) into 8 bit immediate value of LDI insn. */ + BFD_RELOC_AVR_MS8_LDI_NEG, + /* This is a 16 bit reloc for the AVR that stores 8 bit value (usually command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_LO8_LDI_PM, +/* This is a 16 bit reloc for the AVR that stores 8 bit value +(command address) into 8 bit immediate value of LDI insn. If the address +is beyond the 128k boundary, the linker inserts a jump stub for this reloc +in the lower 128k. */ + BFD_RELOC_AVR_LO8_LDI_GS, + /* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit of command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_HI8_LDI_PM, +/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit +of command address) into 8 bit immediate value of LDI insn. If the address +is beyond the 128k boundary, the linker inserts a jump stub for this reloc +below 128k. */ + BFD_RELOC_AVR_HI8_LDI_GS, + /* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit of command address) into 8 bit immediate value of LDI insn. */ BFD_RELOC_AVR_HH8_LDI_PM, @@ -3109,6 +3746,18 @@ value of SUBI insn. */ into 22 bits. */ BFD_RELOC_AVR_CALL, +/* This is a 16 bit reloc for the AVR that stores all needed bits +for absolute addressing with ldi with overflow check to linktime */ + BFD_RELOC_AVR_LDI, + +/* This is a 6 bit reloc for the AVR that stores offset for ldd/std +instructions */ + BFD_RELOC_AVR_6, + +/* This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw +instructions */ + BFD_RELOC_AVR_6_ADIW, + /* Direct 12 bit. */ BFD_RELOC_390_12, @@ -3215,6 +3864,31 @@ into 22 bits. */ BFD_RELOC_390_GOTPLT20, BFD_RELOC_390_TLS_GOTIE20, +/* Score relocations */ + BFD_RELOC_SCORE_DUMMY1, + +/* Low 16 bit for load/store */ + BFD_RELOC_SCORE_GPREL15, + +/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_DUMMY2, + BFD_RELOC_SCORE_JMP, + +/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_BRANCH, + +/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE16_JMP, + +/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE16_BRANCH, + +/* Undocumented Score relocs */ + BFD_RELOC_SCORE_GOT15, + BFD_RELOC_SCORE_GOT_LO16, + BFD_RELOC_SCORE_CALL15, + BFD_RELOC_SCORE_DUMMY_HI16, + /* Scenix IP2K - 9-bit register number / data address */ BFD_RELOC_IP2K_FR9, @@ -3439,6 +4113,35 @@ This is the 5 bits of a value. */ BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C, +/* NS CR16 Relocations. */ + BFD_RELOC_CR16_NUM8, + BFD_RELOC_CR16_NUM16, + BFD_RELOC_CR16_NUM32, + BFD_RELOC_CR16_NUM32a, + BFD_RELOC_CR16_REGREL0, + BFD_RELOC_CR16_REGREL4, + BFD_RELOC_CR16_REGREL4a, + BFD_RELOC_CR16_REGREL14, + BFD_RELOC_CR16_REGREL14a, + BFD_RELOC_CR16_REGREL16, + BFD_RELOC_CR16_REGREL20, + BFD_RELOC_CR16_REGREL20a, + BFD_RELOC_CR16_ABS20, + BFD_RELOC_CR16_ABS24, + BFD_RELOC_CR16_IMM4, + BFD_RELOC_CR16_IMM8, + BFD_RELOC_CR16_IMM16, + BFD_RELOC_CR16_IMM20, + BFD_RELOC_CR16_IMM24, + BFD_RELOC_CR16_IMM32, + BFD_RELOC_CR16_IMM32a, + BFD_RELOC_CR16_DISP4, + BFD_RELOC_CR16_DISP8, + BFD_RELOC_CR16_DISP16, + BFD_RELOC_CR16_DISP20, + BFD_RELOC_CR16_DISP24, + BFD_RELOC_CR16_DISP24a, + /* NS CRX Relocations. */ BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8, @@ -3457,6 +4160,9 @@ This is the 5 bits of a value. */ BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16, BFD_RELOC_CRX_IMM32, + BFD_RELOC_CRX_SWITCH8, + BFD_RELOC_CRX_SWITCH16, + BFD_RELOC_CRX_SWITCH32, /* These relocs are only used within the CRIS assembler. They are not (at present) written to any object files. */ @@ -3464,6 +4170,11 @@ This is the 5 bits of a value. */ BFD_RELOC_CRIS_UNSIGNED_5, BFD_RELOC_CRIS_SIGNED_6, BFD_RELOC_CRIS_UNSIGNED_6, + BFD_RELOC_CRIS_SIGNED_8, + BFD_RELOC_CRIS_UNSIGNED_8, + BFD_RELOC_CRIS_SIGNED_16, + BFD_RELOC_CRIS_UNSIGNED_16, + BFD_RELOC_CRIS_LAPCQ_OFFSET, BFD_RELOC_CRIS_UNSIGNED_4, /* Relocs used in ELF shared libraries for CRIS. */ @@ -3544,17 +4255,47 @@ This is the 5 bits of a value. */ BFD_RELOC_XSTORMY16_24, BFD_RELOC_XSTORMY16_FPTR16, +/* Self-describing complex relocations. */ + BFD_RELOC_RELC, + + +/* Infineon Relocations. */ + BFD_RELOC_XC16X_PAG, + BFD_RELOC_XC16X_POF, + BFD_RELOC_XC16X_SEG, + BFD_RELOC_XC16X_SOF, + /* Relocations used by VAX ELF. */ BFD_RELOC_VAX_GLOB_DAT, BFD_RELOC_VAX_JMP_SLOT, BFD_RELOC_VAX_RELATIVE, +/* Morpho MT - 16 bit immediate relocation. */ + BFD_RELOC_MT_PC16, + +/* Morpho MT - Hi 16 bits of an address. */ + BFD_RELOC_MT_HI16, + +/* Morpho MT - Low 16 bits of an address. */ + BFD_RELOC_MT_LO16, + +/* Morpho MT - Used to tell the linker which vtable entries are used. */ + BFD_RELOC_MT_GNU_VTINHERIT, + +/* Morpho MT - Used to tell the linker which vtable entries are used. */ + BFD_RELOC_MT_GNU_VTENTRY, + +/* Morpho MT - 8 bit immediate relocation. */ + BFD_RELOC_MT_PCINSN8, + /* msp430 specific relocation codes */ BFD_RELOC_MSP430_10_PCREL, BFD_RELOC_MSP430_16_PCREL, BFD_RELOC_MSP430_16, BFD_RELOC_MSP430_16_PCREL_BYTE, BFD_RELOC_MSP430_16_BYTE, + BFD_RELOC_MSP430_2X_PCREL, + BFD_RELOC_MSP430_RL_PCREL, /* IQ2000 Relocations. */ BFD_RELOC_IQ2000_OFFSET_16, @@ -3575,27 +4316,88 @@ to one of its own internal functions or data structures. */ PLT entries. Otherwise, this is just a generic 32-bit relocation. */ BFD_RELOC_XTENSA_PLT, -/* Generic Xtensa relocations. Only the operand number is encoded -in the relocation. The details are determined by extracting the -instruction opcode. */ +/* Xtensa relocations to mark the difference of two local symbols. +These are only needed to support linker relaxation and can be ignored +when not relaxing. The field is set to the value of the difference +assuming no relaxation. The relocation encodes the position of the +first symbol so the linker can determine whether to adjust the field +value. */ + BFD_RELOC_XTENSA_DIFF8, + BFD_RELOC_XTENSA_DIFF16, + BFD_RELOC_XTENSA_DIFF32, + +/* Generic Xtensa relocations for instruction operands. Only the slot +number is encoded in the relocation. The relocation applies to the +last PC-relative immediate operand, or if there are no PC-relative +immediates, to the last immediate operand. */ + BFD_RELOC_XTENSA_SLOT0_OP, + BFD_RELOC_XTENSA_SLOT1_OP, + BFD_RELOC_XTENSA_SLOT2_OP, + BFD_RELOC_XTENSA_SLOT3_OP, + BFD_RELOC_XTENSA_SLOT4_OP, + BFD_RELOC_XTENSA_SLOT5_OP, + BFD_RELOC_XTENSA_SLOT6_OP, + BFD_RELOC_XTENSA_SLOT7_OP, + BFD_RELOC_XTENSA_SLOT8_OP, + BFD_RELOC_XTENSA_SLOT9_OP, + BFD_RELOC_XTENSA_SLOT10_OP, + BFD_RELOC_XTENSA_SLOT11_OP, + BFD_RELOC_XTENSA_SLOT12_OP, + BFD_RELOC_XTENSA_SLOT13_OP, + BFD_RELOC_XTENSA_SLOT14_OP, + +/* Alternate Xtensa relocations. Only the slot is encoded in the +relocation. The meaning of these relocations is opcode-specific. */ + BFD_RELOC_XTENSA_SLOT0_ALT, + BFD_RELOC_XTENSA_SLOT1_ALT, + BFD_RELOC_XTENSA_SLOT2_ALT, + BFD_RELOC_XTENSA_SLOT3_ALT, + BFD_RELOC_XTENSA_SLOT4_ALT, + BFD_RELOC_XTENSA_SLOT5_ALT, + BFD_RELOC_XTENSA_SLOT6_ALT, + BFD_RELOC_XTENSA_SLOT7_ALT, + BFD_RELOC_XTENSA_SLOT8_ALT, + BFD_RELOC_XTENSA_SLOT9_ALT, + BFD_RELOC_XTENSA_SLOT10_ALT, + BFD_RELOC_XTENSA_SLOT11_ALT, + BFD_RELOC_XTENSA_SLOT12_ALT, + BFD_RELOC_XTENSA_SLOT13_ALT, + BFD_RELOC_XTENSA_SLOT14_ALT, + +/* Xtensa relocations for backward compatibility. These have all been +replaced by BFD_RELOC_XTENSA_SLOT0_OP. */ BFD_RELOC_XTENSA_OP0, BFD_RELOC_XTENSA_OP1, BFD_RELOC_XTENSA_OP2, -/* Xtensa relocation to mark that the assembler expanded the +/* Xtensa relocation to mark that the assembler expanded the instructions from an original target. The expansion size is encoded in the reloc size. */ BFD_RELOC_XTENSA_ASM_EXPAND, -/* Xtensa relocation to mark that the linker should simplify -assembler-expanded instructions. This is commonly used -internally by the linker after analysis of a +/* Xtensa relocation to mark that the linker should simplify +assembler-expanded instructions. This is commonly used +internally by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND. */ BFD_RELOC_XTENSA_ASM_SIMPLIFY, + +/* 8 bit signed offset in (ix+d) or (iy+d). */ + BFD_RELOC_Z80_DISP8, + +/* DJNZ offset. */ + BFD_RELOC_Z8K_DISP7, + +/* CALR offset. */ + BFD_RELOC_Z8K_CALLR, + +/* 4 bit value. */ + BFD_RELOC_Z8K_IMM4L, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type *bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code); +reloc_howto_type *bfd_reloc_name_lookup + (bfd *abfd, const char *reloc_name); const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code); @@ -3708,6 +4510,14 @@ typedef struct bfd_symbol /* This symbol is thread local. Used in ELF. */ #define BSF_THREAD_LOCAL 0x40000 + /* This symbol represents a complex relocation expression, + with the expression tree serialized in the symbol name. */ +#define BSF_RELC 0x80000 + + /* This symbol represents a signed complex relocation expression, + with the expression tree serialized in the symbol name. */ +#define BSF_SRELC 0x100000 + flagword flags; /* A pointer to the section to which this symbol is @@ -3735,6 +4545,11 @@ bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) +bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); + +#define bfd_is_target_special_symbol(abfd, sym) \ + BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) + #define bfd_canonicalize_symtab(abfd, location) \ BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) @@ -3842,8 +4657,8 @@ struct bfd /* Pointer to linked list of sections. */ struct bfd_section *sections; - /* The place where we add to the section list. */ - struct bfd_section **section_tail; + /* The last section on the section list. */ + struct bfd_section *section_last; /* The number of sections. */ unsigned int section_count; @@ -3864,10 +4679,13 @@ struct bfd /* Pointer to structure which contains architecture information. */ const struct bfd_arch_info *arch_info; + /* Flag set if symbols from this BFD should not be exported. */ + bfd_boolean no_export; + /* Stuff only useful for archives. */ void *arelt_data; struct bfd *my_archive; /* The containing archive BFD. */ - struct bfd *next; /* The next BFD in the archive. */ + struct bfd *archive_next; /* The next BFD in the archive. */ struct bfd *archive_head; /* The first BFD in the archive. */ bfd_boolean has_armap; @@ -3949,13 +4767,14 @@ typedef enum bfd_error bfd_error_bad_value, bfd_error_file_truncated, bfd_error_file_too_big, + bfd_error_on_input, bfd_error_invalid_error_code } bfd_error_type; bfd_error_type bfd_get_error (void); -void bfd_set_error (bfd_error_type error_tag); +void bfd_set_error (bfd_error_type error_tag, ...); const char *bfd_errmsg (bfd_error_type error_tag); @@ -3969,8 +4788,6 @@ void bfd_set_error_program_name (const char *); bfd_error_handler_type bfd_get_error_handler (void); -const char *bfd_archive_filename (bfd *); - long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc @@ -4012,13 +4829,21 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) -#define bfd_sizeof_headers(abfd, reloc) \ - BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc)) +#define bfd_sizeof_headers(abfd, info) \ + BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info)) #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, \ (abfd, sec, syms, off, file, func, line)) +#define bfd_find_line(abfd, syms, sym, file, line) \ + BFD_SEND (abfd, _bfd_find_line, \ + (abfd, syms, sym, file, line)) + +#define bfd_find_inliner_info(abfd, file, func, line) \ + BFD_SEND (abfd, _bfd_find_inliner_info, \ + (abfd, file, func, line)) + #define bfd_debug_info_start(abfd) \ BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) @@ -4061,7 +4886,7 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_link_add_symbols(abfd, info) \ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info)) -#define bfd_link_just_syms(sec, info) \ +#define bfd_link_just_syms(abfd, sec, info) \ BFD_SEND (abfd, _bfd_link_just_syms, (sec, info)) #define bfd_final_link(abfd, info) \ @@ -4079,8 +4904,9 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \ BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols)) -#define bfd_get_synthetic_symtab(abfd, dynsyms, ret) \ - BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, dynsyms, ret)) +#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \ + BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \ + dyncount, dynsyms, ret)) #define bfd_get_dynamic_reloc_upper_bound(abfd) \ BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd)) @@ -4101,7 +4927,7 @@ struct bfd_preserve flagword flags; const struct bfd_arch_info *arch_info; struct bfd_section *sections; - struct bfd_section **section_tail; + struct bfd_section *section_last; unsigned int section_count; struct bfd_hash_table section_htab; }; @@ -4112,7 +4938,15 @@ void bfd_preserve_restore (bfd *, struct bfd_preserve *); void bfd_preserve_finish (bfd *, struct bfd_preserve *); -char *bfd_get_section_ident (asection *sec); +bfd_vma bfd_emul_get_maxpagesize (const char *); + +void bfd_emul_set_maxpagesize (const char *, bfd_vma); + +bfd_vma bfd_emul_get_commonpagesize (const char *); + +void bfd_emul_set_commonpagesize (const char *, bfd_vma); + +char *bfd_demangle (bfd *, const char *, int); /* Extracted from archive.c. */ symindex bfd_get_next_mapent @@ -4130,6 +4964,9 @@ int bfd_core_file_failing_signal (bfd *abfd); bfd_boolean core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); +bfd_boolean generic_core_file_matches_executable_p + (bfd *core_bfd, bfd *exec_bfd); + /* Extracted from targets.c. */ #define BFD_SEND(bfd, message, arglist) \ ((*((bfd)->xvec->message)) arglist) @@ -4218,7 +5055,7 @@ typedef struct bfd_target unsigned short ar_max_namelen; /* Entries for byte swapping for data. These are different from the - other entry points, since they don't take a BFD asthe first argument. + other entry points, since they don't take a BFD as the first argument. Certain other handlers could do the same. */ bfd_uint64_t (*bfd_getx64) (const void *); bfd_int64_t (*bfd_getx_signed_64) (const void *); @@ -4278,6 +5115,7 @@ typedef struct bfd_target #define BFD_JUMP_TABLE_COPY(NAME) \ NAME##_bfd_copy_private_bfd_data, \ NAME##_bfd_merge_private_bfd_data, \ + _bfd_generic_init_private_section_data, \ NAME##_bfd_copy_private_section_data, \ NAME##_bfd_copy_private_symbol_data, \ NAME##_bfd_copy_private_header_data, \ @@ -4290,6 +5128,12 @@ typedef struct bfd_target /* Called to merge BFD general private data from one object file to a common output file when linking. */ bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *); + /* Called to initialize BFD private section data from one object file + to another. */ +#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ + BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info)) + bfd_boolean (*_bfd_init_private_section_data) + (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ bfd_boolean (*_bfd_copy_private_section_data) @@ -4353,8 +5197,11 @@ typedef struct bfd_target NAME##_print_symbol, \ NAME##_get_symbol_info, \ NAME##_bfd_is_local_label_name, \ + NAME##_bfd_is_target_special_symbol, \ NAME##_get_lineno, \ NAME##_find_nearest_line, \ + _bfd_generic_find_line, \ + NAME##_find_inliner_info, \ NAME##_bfd_make_debug_symbol, \ NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol @@ -4371,11 +5218,16 @@ typedef struct bfd_target (bfd *, struct bfd_symbol *, symbol_info *); #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); - + bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); alent * (*_get_lineno) (bfd *, struct bfd_symbol *); bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma, const char **, const char **, unsigned int *); + bfd_boolean (*_bfd_find_line) + (bfd *, struct bfd_symbol **, struct bfd_symbol *, + const char **, unsigned int *); + bfd_boolean (*_bfd_find_inliner_info) + (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ @@ -4394,7 +5246,8 @@ typedef struct bfd_target #define BFD_JUMP_TABLE_RELOCS(NAME) \ NAME##_get_reloc_upper_bound, \ NAME##_canonicalize_reloc, \ - NAME##_bfd_reloc_type_lookup + NAME##_bfd_reloc_type_lookup, \ + NAME##_bfd_reloc_name_lookup long (*_get_reloc_upper_bound) (bfd *, sec_ptr); long (*_bfd_canonicalize_reloc) @@ -4402,6 +5255,9 @@ typedef struct bfd_target /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); + reloc_howto_type * + (*reloc_name_lookup) (bfd *, const char *); + /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ @@ -4427,9 +5283,10 @@ typedef struct bfd_target NAME##_bfd_gc_sections, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ - NAME##_bfd_discard_group + NAME##_bfd_discard_group, \ + NAME##_section_already_linked \ - int (*_bfd_sizeof_headers) (bfd *, bfd_boolean); + int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, bfd_boolean, struct bfd_symbol **); @@ -4470,6 +5327,11 @@ typedef struct bfd_target /* Discard members of a group. */ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); + /* Check if SEC has been already linked during a reloceatable or + final link. */ + void (*_section_already_linked) (bfd *, struct bfd_section *, + struct bfd_link_info *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -4485,7 +5347,8 @@ typedef struct bfd_target (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ long (*_bfd_get_synthetic_symtab) - (bfd *, struct bfd_symbol **, struct bfd_symbol **); + (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ @@ -4527,6 +5390,12 @@ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) +void bfd_section_already_linked (bfd *abfd, asection *sec, + struct bfd_link_info *info); + +#define bfd_section_already_linked(abfd, sec, info) \ + BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) + /* Extracted from simple.c. */ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); diff --git a/gnu/usr.bin/gdb/libbfd/bfdver.h b/gnu/usr.bin/gdb/libbfd/bfdver.h index 5f0da5c8e8..011c70dbc9 100644 --- a/gnu/usr.bin/gdb/libbfd/bfdver.h +++ b/gnu/usr.bin/gdb/libbfd/bfdver.h @@ -1,4 +1,5 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libbfd/Attic/bfdver.h,v 1.1 2004/10/23 17:02:38 joerg Exp $ */ -#define BFD_VERSION_DATE 20040709 -#define BFD_VERSION 215910000 -#define BFD_VERSION_STRING "2.15.91 20040709" +/* $DragonFly: src/gnu/usr.bin/gdb/libbfd/Attic/bfdver.h,v 1.2 2008/01/14 21:36:38 corecode Exp $ */ +#define BFD_VERSION_DATE 20070907 +#define BFD_VERSION 218500000 +#define BFD_VERSION_STRING "(GNU Binutils)" "2.18.50.20070907" +#define REPORT_BUGS_TO "" diff --git a/gnu/usr.bin/gdb/libbfd/config.h b/gnu/usr.bin/gdb/libbfd/config.h index 0985fc2ee4..ac123cbea6 100644 --- a/gnu/usr.bin/gdb/libbfd/config.h +++ b/gnu/usr.bin/gdb/libbfd/config.h @@ -1,296 +1,299 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libbfd/config.h,v 1.1 2004/10/23 17:02:38 joerg Exp $ */ -/* config.h. Generated automatically by configure. */ -/* config.in. Generated automatically from configure.in by autoheader. */ +/* $DragonFly: src/gnu/usr.bin/gdb/libbfd/config.h,v 1.2 2008/01/14 21:36:38 corecode Exp $ */ +/* config.h. Generated by configure. */ +/* config.in. Generated from configure.in by autoheader. */ -/* Define if using alloca.c. */ -/* #undef C_ALLOCA */ +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ -/* Define to empty if the keyword does not work. */ -/* #undef const */ +/* Define to 1 if you have the declaration of `basename', and to 0 if you + don't. */ +#define HAVE_DECL_BASENAME 0 -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -/* #undef CRAY_STACKSEG_END */ +/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */ +#define HAVE_DECL_FFS 1 -/* Define if you have alloca, as a function or macro. */ -#define HAVE_ALLOCA 1 +/* Define to 1 if you have the declaration of `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 -/* Define if you have and it should be used (not on Ultrix). */ -/* #undef HAVE_ALLOCA_H */ +/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. + */ +#define HAVE_DECL_FSEEKO 1 -/* Define if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 +/* Define to 1 if you have the declaration of `fseeko64', and to 0 if you + don't. */ +#define HAVE_DECL_FSEEKO64 0 -/* Define as __inline if that's what the C compiler calls it. */ -/* #undef inline */ +/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. + */ +#define HAVE_DECL_FTELLO 1 -/* Define to `long' if doesn't define. */ -/* #undef off_t */ +/* Define to 1 if you have the declaration of `ftello64', and to 0 if you + don't. */ +#define HAVE_DECL_FTELLO64 0 -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -/* #undef STACK_DIRECTION */ +/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't. + */ +#define HAVE_DECL_MALLOC 1 -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 +/* Define to 1 if you have the declaration of `realloc', and to 0 if you + don't. */ +#define HAVE_DECL_REALLOC 1 -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 +/* Define to 1 if you have the declaration of `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 -/* Define if you have the __argz_count function. */ -/* #undef HAVE___ARGZ_COUNT */ +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 0 -/* Define if you have the __argz_next function. */ -/* #undef HAVE___ARGZ_NEXT */ +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 -/* Define if you have the __argz_stringify function. */ -/* #undef HAVE___ARGZ_STRINGIFY */ +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VSNPRINTF 1 -/* Define if you have the dcgettext function. */ -/* #undef HAVE_DCGETTEXT */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 -/* Define if you have the fcntl function. */ +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `fcntl' function. */ #define HAVE_FCNTL 1 -/* Define if you have the fdopen function. */ +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fdopen' function. */ #define HAVE_FDOPEN 1 -/* Define if you have the fseeko function. */ +/* Define to 1 if you have the `fopen64' function. */ +/* #undef HAVE_FOPEN64 */ + +/* Define to 1 if you have the `fseeko' function. */ #define HAVE_FSEEKO 1 -/* Define if you have the fseeko64 function. */ +/* Define to 1 if you have the `fseeko64' function. */ /* #undef HAVE_FSEEKO64 */ -/* Define if you have the ftello function. */ +/* Define to 1 if you have the `ftello' function. */ #define HAVE_FTELLO 1 -/* Define if you have the ftello64 function. */ +/* Define to 1 if you have the `ftello64' function. */ /* #undef HAVE_FTELLO64 */ -/* Define if you have the getcwd function. */ -#define HAVE_GETCWD 1 - -/* Define if you have the getgid function. */ +/* Define to 1 if you have the `getgid' function. */ #define HAVE_GETGID 1 -/* Define if you have the getpagesize function. */ +/* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 -/* Define if you have the getuid function. */ +/* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 -/* Define if you have the madvise function. */ -#define HAVE_MADVISE 1 +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 -/* Define if you have the mprotect function. */ -#define HAVE_MPROTECT 1 +/* Define if has lwpstatus_t. */ +/* #undef HAVE_LWPSTATUS_T */ -/* Define if you have the munmap function. */ -#define HAVE_MUNMAP 1 +/* Define if has lwpstatus_t.pr_context. */ +/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */ -/* Define if you have the putenv function. */ -#define HAVE_PUTENV 1 +/* Define if has lwpstatus_t.pr_reg. */ +/* #undef HAVE_LWPSTATUS_T_PR_REG */ -/* Define if you have the setenv function. */ -#define HAVE_SETENV 1 +/* Define if has lwpxstatus_t. */ +/* #undef HAVE_LWPXSTATUS_T */ -/* Define if you have the setitimer function. */ -#define HAVE_SETITIMER 1 +/* Define to 1 if you have the `madvise' function. */ +#define HAVE_MADVISE 1 -/* Define if you have the setlocale function. */ -#define HAVE_SETLOCALE 1 +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 -/* Define if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 -/* Define if you have the strchr function. */ -#define HAVE_STRCHR 1 +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ -/* Define if you have the strtoull function. */ -#define HAVE_STRTOULL 1 +/* Define if has prpsinfo32_t. */ +/* #undef HAVE_PRPSINFO32_T */ -/* Define if you have the sysconf function. */ -#define HAVE_SYSCONF 1 +/* Define if has prpsinfo_t. */ +#define HAVE_PRPSINFO_T 1 -/* Define if you have the header file. */ -/* #undef HAVE_ARGZ_H */ +/* Define if has prstatus32_t. */ +/* #undef HAVE_PRSTATUS32_T */ -/* Define if you have the header file. */ -#define HAVE_DIRENT_H 1 +/* Define if has prstatus32_t.pr_who. */ +/* #undef HAVE_PRSTATUS32_T_PR_WHO */ -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 +/* Define if has prstatus_t. */ +#define HAVE_PRSTATUS_T 1 -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 +/* Define if has prstatus_t.pr_who. */ +/* #undef HAVE_PRSTATUS_T_PR_WHO */ -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 +/* Define if has psinfo32_t. */ +/* #undef HAVE_PSINFO32_T */ -/* Define if you have the header file. */ -/* #undef HAVE_MALLOC_H */ +/* Define if has psinfo_t. */ +/* #undef HAVE_PSINFO_T */ -/* Define if you have the header file. */ -/* #undef HAVE_NDIR_H */ +/* Define if has pstatus32_t. */ +/* #undef HAVE_PSTATUS32_T */ -/* Define if you have the header file. */ -#define HAVE_NL_TYPES_H 1 +/* Define if has pstatus_t. */ +/* #undef HAVE_PSTATUS_T */ -/* Define if you have the header file. */ +/* Define if has pxstatus_t. */ +/* #undef HAVE_PXSTATUS_T */ + +/* Define to 1 if you have the `setitimer' function. */ +#define HAVE_SETITIMER 1 + +/* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define if you have the header file. */ -#define HAVE_STRINGS_H 1 +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + +/* Define if struct core_dumpx has member c_impl */ +/* #undef HAVE_ST_C_IMPL */ -/* Define if you have the header file. */ +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ /* #undef HAVE_SYS_DIR_H */ -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_FILE_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ /* #undef HAVE_SYS_NDIR_H */ -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_PROCFS_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_SYS_STAT_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_SYS_TYPES_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_VALUES_H */ +/* Define if has win32_pstatus_t. */ +/* #undef HAVE_WIN32_PSTATUS_T */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "bfd" -/* Version number of package */ -#define VERSION "2.15.91" - -/* Define if you have the stpcpy function */ -/* #undef HAVE_STPCPY */ - -/* Define if your locale.h file contains LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Define to 1 if NLS is requested */ -/* #undef ENABLE_NLS */ - -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ -/* #undef HAVE_GETTEXT */ - -/* The number of bytes in type long long */ -#define SIZEOF_LONG_LONG 8 - -/* The number of bytes in type long */ -#define SIZEOF_LONG 4 - -/* Use b modifier when opening binary files? */ -/* #undef USE_BINARY_FOPEN */ - -/* Define if strstr is not declared in system header files. */ -/* #undef NEED_DECLARATION_STRSTR */ - -/* Define if malloc is not declared in system header files. */ -/* #undef NEED_DECLARATION_MALLOC */ +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" -/* Define if realloc is not declared in system header files. */ -/* #undef NEED_DECLARATION_REALLOC */ +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" -/* Define if free is not declared in system header files. */ -/* #undef NEED_DECLARATION_FREE */ +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" -/* Define if getenv is not declared in system header files. */ -/* #undef NEED_DECLARATION_GETENV */ +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" -/* Define if struct core_dumpx has member c_impl */ -/* #undef HAVE_ST_C_IMPL */ +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" -/* Define if has prstatus_t. */ -#define HAVE_PRSTATUS_T 1 +/* The size of a `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ -/* Define if has prstatus32_t. */ -/* #undef HAVE_PRSTATUS32_T */ - -/* Define if has prstatus_t.pr_who. */ -/* #undef HAVE_PRSTATUS_T_PR_WHO */ +/* The size of a `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ -/* Define if has prstatus32_t.pr_who. */ -/* #undef HAVE_PRSTATUS32_T_PR_WHO */ - -/* Define if has pstatus_t. */ -/* #undef HAVE_PSTATUS_T */ - -/* Define if has pxstatus_t. */ -/* #undef HAVE_PXSTATUS_T */ - -/* Define if has pstatus32_t. */ -/* #undef HAVE_PSTATUS32_T */ +/* The size of a `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 -/* Define if has prpsinfo_t. */ -#define HAVE_PRPSINFO_T 1 +/* The size of a `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 -/* Define if has prpsinfo32_t. */ -/* #undef HAVE_PRPSINFO32_T */ +/* The size of a `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 8 -/* Define if has psinfo_t. */ -/* #undef HAVE_PSINFO_T */ +/* The size of a `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ -/* Define if has psinfo32_t. */ -/* #undef HAVE_PSINFO32_T */ +/* The size of a `void *', as computed by sizeof. */ +/* #undef SIZEOF_VOID_P */ -/* Define if has lwpstatus_t. */ -/* #undef HAVE_LWPSTATUS_T */ +/* The sizeof of a 'void *', as computed by sizeof. */ +/* #undef SIZEOF_VOID_P */ -/* Define if has lwpxstatus_t. */ -/* #undef HAVE_LWPXSTATUS_T */ - -/* Define if has lwpstatus_t.pr_context. */ -/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */ +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 -/* Define if has lwpstatus_t.pr_reg. */ -/* #undef HAVE_LWPSTATUS_T_PR_REG */ +/* Define if you can safely include both and . */ +#define STRING_WITH_STRINGS 1 -/* Define if has win32_pstatus_t. */ -/* #undef HAVE_WIN32_PSTATUS_T */ +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 /* Name of host specific header file to include in trad-core.c. */ #define TRAD_HEADER "hosts/i386bsd.h" -/* The number of bytes in type off_t */ -#define SIZEOF_OFF_T 8 +/* Use b modifier when opening binary files? */ +/* #undef USE_BINARY_FOPEN */ /* Use mmap if it's available? */ /* #undef USE_MMAP */ +/* Define if we should default to creating read-only plt entries */ +/* #undef USE_SECUREPLT */ + +/* Version number of package */ +#define VERSION "2.18.50" + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif diff --git a/gnu/usr.bin/gdb/libgdb/Makefile b/gnu/usr.bin/gdb/libgdb/Makefile index 81180d8dac..e993fc53ea 100644 --- a/gnu/usr.bin/gdb/libgdb/Makefile +++ b/gnu/usr.bin/gdb/libgdb/Makefile @@ -1,13 +1,10 @@ -# $DragonFly: src/gnu/usr.bin/gdb/libgdb/Makefile,v 1.4 2007/10/27 22:36:47 pavalos Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/libgdb/Makefile,v 1.5 2008/01/14 21:36:38 corecode Exp $ .include "../Makefile.inc" -#PROG= gdb LIB= gdb INTERNALLIB= # yes -#SUBDIR= doc - CONTRIBDIR= ${BASEDIR}/gdb .PATH: ${CONTRIBDIR} ${CONTRIBDIR}/cli ${CONTRIBDIR}/mi ${CONTRIBDIR}/signals .PATH: ${CONTRIBDIR}/tui @@ -15,58 +12,129 @@ CONTRIBDIR= ${BASEDIR}/gdb CFLAGS+= -I${.OBJDIR} -I${.CURDIR} -I${BASEDIR}/include -I${BASEDIR}/bfd CFLAGS+= -I${CONTRIBDIR} -I${CONTRIBDIR}/config -I${.CURDIR}/../libbfd CFLAGS+= -I${BASEDIR} +CFLAGS+= -DTARGET_SYSTEM_ROOT='"/"' -DBINDIR='"/usr/bin"' +CFLAGS+= -DMACHINE_ARCH='"${MACHINE_ARCH}"' + +CLEANFILES+= nm.h observer.h observer.inc tm.h xm.h gdb_stdint.h + +SRCS+= nm.h observer.h tm.h xm.h gdb_stdint.h + +# The order of these sources is important, +# because init.c below needs to obey a certain ordering +# of function calls. + +# COMMON_OBS +SRCS+= version.c \ + annotate.c \ + auxv.c \ + bfd-target.c \ + blockframe.c breakpoint.c findvar.c regcache.c \ + charset.c disasm.c dummy-frame.c \ + source.c value.c eval.c valops.c valarith.c valprint.c printcmd.c \ + block.c symtab.c symfile.c symmisc.c linespec.c dictionary.c \ + infcall.c \ + infcmd.c infrun.c \ + expprint.c environ.c stack.c thread.c \ + exceptions.c \ + inf-child.c \ + interps.c \ + main.c \ + macrotab.c macrocmd.c macroexp.c macroscope.c \ + event-loop.c event-top.c inf-loop.c completer.c \ + gdbarch.c arch-utils.c gdbtypes.c osabi.c copying.c \ + memattr.c mem-break.c target.c parse.c language.c buildsym.c \ + std-regs.c \ + signals.c \ + gdb-events.c \ + exec.c bcache.c objfiles.c observer.c minsyms.c maint.c demangle.c \ + dbxread.c coffread.c coff-pe-read.c \ + dwarf2read.c mipsread.c stabsread.c corefile.c \ + dwarf2expr.c dwarf2loc.c dwarf2-frame.c \ + ada-lang.c c-lang.c f-lang.c objc-lang.c \ + ui-out.c cli-out.c \ + varobj.c vec.c wrapper.c \ + jv-lang.c jv-valprint.c jv-typeprint.c \ + m2-lang.c p-lang.c p-typeprint.c p-valprint.c \ + scm-exp.c scm-lang.c scm-valprint.c \ + sentinel-frame.c \ + complaints.c typeprint.c \ + ada-typeprint.c c-typeprint.c f-typeprint.c m2-typeprint.c \ + ada-valprint.c c-valprint.c cp-valprint.c f-valprint.c m2-valprint.c \ + serial.c mdebugread.c top.c utils.c \ + ui-file.c \ + user-regs.c \ + frame.c frame-unwind.c doublest.c \ + frame-base.c \ + gnu-v2-abi.c gnu-v3-abi.c cp-abi.c cp-support.c \ + cp-namespace.c \ + reggroups.c regset.c \ + trad-frame.c \ + tramp-frame.c \ + solib.c solib-null.c \ + prologue-value.c memory-map.c \ + target-descriptions.c target-memory.c xml-tdesc.c + +# TSOBS +SRCS+= inflow.o + +# SER_HARDWIRE +SRCS+= ser-base.c ser-unix.c ser-pipe.c ser-tcp.c + +# TDEPFILES (part 1, the other is in Makefile.ARCH) +SRCS+= bsd-uthread.c corelow.c solib-svr4.c + +# NATDEPFILES (part 1, the other is in Makefile.ARCH) +SRCS+= fork-child.c inf-ptrace.c gcore.c fbsd-nat.c + +# REMOTE_OBS +SRCS+= remote.c dcache.c tracepoint.c ax-general.c ax-gdb.c remote-fileio.c + +# SUBDIR_CLI_OBS +SRCS+= cli-dump.c \ + cli-decode.c cli-script.c cli-cmds.c cli-setshow.c cli-utils.c \ + cli-logging.c \ + cli-interp.c + +# SUBDIR_MI_OBS +SRCS+= mi-out.c mi-console.c \ + mi-cmds.c mi-cmd-env.c mi-cmd-var.c mi-cmd-break.c mi-cmd-stack.c \ + mi-cmd-file.c mi-cmd-disas.c mi-symbol-cmds.c \ + mi-interp.c \ + mi-main.c mi-parse.c mi-getopt.c mi-common.c + +# CONFIG_OBS +SRCS+= elfread.c posix-hdep.c + +# SUBDIR_TUI_OBS +SRCS+= tui-command.c \ + tui-data.c \ + tui-disasm.c \ + tui-file.c tui.c \ + tui-hooks.c \ + tui-interp.c \ + tui-io.c \ + tui-layout.c \ + tui-out.c \ + tui-regs.c \ + tui-source.c \ + tui-stack.c \ + tui-win.c \ + tui-windata.c \ + tui-wingeneral.c \ + tui-winsource.c + +# YYOBJ +SRCS+= c-exp.y \ + cp-name-parser.y \ + objc-exp.y \ + ada-exp.y \ + jv-exp.y \ + f-exp.y m2-exp.y p-exp.y + +SRCS+= init.c -.if defined(GDB_TUI) -CFLAGS+= -DTUI=1 -SRCS= tui-main.c -.else -#SRCS= gdb.c -.endif - -CLEANFILES+= nm.h observer.h observer.inc tm.h xm.h - -SRCS+= nm.h observer.h tm.h xm.h - -# libgdb -SRCS+= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c bcache.c -SRCS+= bfd-target.c block.c blockframe.c breakpoint.c buildsym.c -SRCS+= c-exp.y c-lang.c c-typeprint.c c-valprint.c charset.c cli-cmds.c -SRCS+= cli-decode.c cli-dump.c cli-interp.c cli-logging.c cli-out.c -SRCS+= cli-script.c cli-setshow.c cli-utils.c coff-pe-read.c coffread.c -SRCS+= complaints.c completer.c copying.c corefile.c corelow.c cp-abi.c -SRCS+= cp-namespace.c cp-support.c cp-valprint.c dbxread.c dcache.c demangle.c -SRCS+= dictionary.c disasm.c doublest.c dummy-frame.c dwarf2-frame.c -SRCS+= dwarf2expr.c dwarf2loc.c dwarf2read.c dwarfread.c elfread.c environ.c -SRCS+= eval.c event-loop.c event-top.c exec.c expprint.c f-exp.y f-lang.c -SRCS+= f-typeprint.c f-valprint.c fbsd-proc.c findvar.c fork-child.c -SRCS+= frame-base.c frame-unwind.c frame.c gcore.c gdb-events.c gdbarch.c -SRCS+= gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c hpacc-abi.c inf-loop.c infcall.c -SRCS+= infcmd.c inflow.c infptrace.c infrun.c inftarg.c init.c interps.c -SRCS+= jv-exp.y jv-lang.c jv-typeprint.c jv-valprint.c kod-cisco.c kod.c -SRCS+= language.c linespec.c m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c -SRCS+= macrocmd.c macroexp.c macroscope.c macrotab.c main.c maint.c -SRCS+= mdebugread.c mem-break.c memattr.c mi-cmd-break.c mi-cmd-disas.c -SRCS+= mi-cmd-env.c mi-cmd-file.c mi-cmd-stack.c mi-cmd-var.c mi-cmds.c -SRCS+= mi-console.c mi-getopt.c mi-interp.c mi-main.c mi-out.c -SRCS+= mi-parse.c mi-symbol-cmds.c minsyms.c mipsread.c nlmread.c objc-exp.y -SRCS+= objc-lang.c objfiles.c observer.c osabi.c p-exp.y p-lang.c -SRCS+= p-typeprint.c p-valprint.c parse.c printcmd.c regcache.c reggroups.c -SRCS+= regset.c remote-fileio.c remote-utils.c remote.c scm-exp.c scm-lang.c -SRCS+= scm-valprint.c sentinel-frame.c ser-pipe.c ser-tcp.c ser-unix.c -SRCS+= serial.c signals.c solib-legacy.c solib-svr4.c solib.c source.c -SRCS+= stabsread.c -SRCS+= stack.c std-regs.c symfile.c symmisc.c symtab.c target.c thread.c -SRCS+= top.c tracepoint.c trad-frame.c tramp-frame.c typeprint.c -SRCS+= ui-file.c ui-out.c user-regs.c utils.c valarith.c valops.c valprint.c -SRCS+= values.c varobj.c version.c wrapper.c -# tui specific -.if defined(GDB_TUI) -SRCS+= tui.c tui-command.c tui-data.c tui-disasm.c tui-file.c tui-hooks.c -SRCS+= tui-interp.c tui-io.c tui-layout.c tui-out.c tui-regs.c tui-source.c -SRCS+= tui-stack.c tui-win.c tui-windata.c tui-wingeneral.c tui-winsource.c -.endif # kernel-debugger -SRCS+= freebsd-uthread.c +#SRCS+= freebsd-uthread.c #SRCS+= kthr.c trgt.c trgt_${MACHINE_ARCH}.c DPADD= ${LIBEDIT} ${LIBKVM} ${LIBTERMCAP} ${LIBM} @@ -94,4 +162,7 @@ observer.h: observer.sh observer.inc doc/observer.texi observer.inc: observer.sh doc/observer.texi sh ${CONTRIBDIR}/observer.sh inc ${CONTRIBDIR}/doc/observer.texi ${.TARGET} +gdb_stdint.h: + touch ${.TARGET} + .include diff --git a/gnu/usr.bin/gdb/libgdb/Makefile.amd64 b/gnu/usr.bin/gdb/libgdb/Makefile.amd64 index 91fc1d0b47..e151b280cd 100644 --- a/gnu/usr.bin/gdb/libgdb/Makefile.amd64 +++ b/gnu/usr.bin/gdb/libgdb/Makefile.amd64 @@ -1,11 +1,11 @@ -# $DragonFly: src/gnu/usr.bin/gdb/libgdb/Makefile.amd64,v 1.3 2007/08/21 19:55:23 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/libgdb/Makefile.amd64,v 1.4 2008/01/14 21:36:38 corecode Exp $ -SRCS+= amd64-nat.c amd64-tdep.c amd64bsd-nat.c amd64fbsd-nat.c -SRCS+= amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c i386fbsd-tdep.c -SRCS+= i387-tdep.c +# TDEPFILES (part 2, cleaned) +SRCS+= amd64-tdep.o amd64fbsd-tdep.o \ + i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o -# Hack to avoid compilation of the wrong file -SRCS:= ${SRCS:N*i386bsd-nat.c*:N*i386fbsd-nat.c*} +# NATDEPFILES (part 2) +SRCS+= amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o nm.h: echo '#include "i386/nm-fbsd64.h"' > ${.TARGET} diff --git a/gnu/usr.bin/gdb/libgdb/Makefile.i386 b/gnu/usr.bin/gdb/libgdb/Makefile.i386 index b75a1fc52e..a253c204ce 100644 --- a/gnu/usr.bin/gdb/libgdb/Makefile.i386 +++ b/gnu/usr.bin/gdb/libgdb/Makefile.i386 @@ -1,10 +1,13 @@ -# $DragonFly: src/gnu/usr.bin/gdb/libgdb/Makefile.i386,v 1.3 2007/02/25 23:17:12 corecode Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/libgdb/Makefile.i386,v 1.4 2008/01/14 21:36:38 corecode Exp $ -SRCS+= i386-nat.c i386-tdep.c i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c -SRCS+= i386fbsd-tdep.c i387-tdep.c +# TDEPFILES (part 2, cleaned) +SRCS+= i386-tdep.c i387-tdep.c i386bsd-tdep.c i386fbsd-tdep.c + +# NATDEPFILES (part 2) +SRCS+= fbsd-nat.c i386-nat.c i386bsd-nat.c i386fbsd-nat.c nm.h: - echo '#include "nm-dragonfly.h"' > ${.TARGET} + echo '#include "i386/nm-fbsd.h"' > ${.TARGET} tm.h: echo '#include "i386/tm-fbsd.h"' > ${.TARGET} diff --git a/gnu/usr.bin/gdb/libgdb/config.h b/gnu/usr.bin/gdb/libgdb/config.h index 2ad79560e2..08f1919069 100644 --- a/gnu/usr.bin/gdb/libgdb/config.h +++ b/gnu/usr.bin/gdb/libgdb/config.h @@ -1,556 +1,623 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libgdb/config.h,v 1.1 2006/03/07 15:48:11 corecode Exp $ */ -/* config.h. Generated automatically by configure. */ -/* config.in. Generated automatically from configure.in by autoheader. */ +/* $DragonFly: src/gnu/usr.bin/gdb/libgdb/config.h,v 1.2 2008/01/14 21:36:38 corecode Exp $ */ +/* config.h. Generated by configure. */ +/* config.in. Generated from configure.ac by autoheader. */ -/* Define if on AIX 3. - System headers sometimes define this. - We just want to avoid a redefinition error message. */ -#ifndef _ALL_SOURCE -/* #undef _ALL_SOURCE */ -#endif +/* Define to 1 if the compiler supports long long. */ +#define CC_HAS_LONG_LONG 1 -/* Define if using alloca.c. */ +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ -/* Define to empty if the keyword does not work. */ -/* #undef const */ +/* Global directory for separate debug files. */ +#define DEBUGDIR "/usr/lib/debug" -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -/* #undef CRAY_STACKSEG_END */ +/* Define if the debug directory should be relocated when GDB is moved. */ +#define DEBUGDIR_RELOCATABLE 1 -/* Define if you have alloca, as a function or macro. */ -#define HAVE_ALLOCA 1 +/* Define to BFD's default architecture. */ +/* This is set by Makefile.ARCH */ +/* #define DEFAULT_BFD_ARCH bfd_i386_arch */ -/* Define if you have and it should be used (not on Ultrix). */ -/* #undef HAVE_ALLOCA_H */ +/* Define to BFD's default target vector. */ +/* This is set by Makefile.ARCH */ +/* #define DEFAULT_BFD_VEC bfd_elf32_i386_freebsd_vec */ -/* Define if the `long double' type works. */ -#define HAVE_LONG_DOUBLE 1 +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ -/* Define if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 +/* Define to be a string naming the default host character set. */ +#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" -/* Define if you have . */ -/* #undef HAVE_VFORK_H */ +/* Host double floatformat */ +#define GDB_HOST_DOUBLE_FORMAT &floatformat_ieee_double_little -/* Define as __inline if that's what the C compiler calls it. */ -/* #undef inline */ +/* Host float floatformat */ +#define GDB_HOST_FLOAT_FORMAT &floatformat_ieee_single_little -/* Define to `long' if doesn't define. */ -/* #undef off_t */ +/* Host long double floatformat */ +#define GDB_HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ +/* nativefile */ +#define GDB_NM_FILE "config/i386/nm-fbsd.h" -/* Define if you need to in order for stat and other things to work. */ -/* #undef _POSIX_SOURCE */ +/* Define to the default OS ABI for this configuration. */ +/* #undef GDB_OSABI_DEFAULT */ -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void +/* targetfile */ +/* #undef GDB_TM_FILE */ -/* Define if the `setpgrp' function takes no argument. */ -/* #undef SETPGRP_VOID */ +/* hostfile */ +/* #undef GDB_XM_FILE */ -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -/* #undef STACK_DIRECTION */ +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ -/* Define if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 -/* Define vfork as fork if vfork does not work. */ -/* #undef vfork */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CURSESX_H */ -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif +/* Define to 1 if you have the header file. */ +#define HAVE_CURSES_H 1 -/* Define if your struct reg has r_fs. */ -#define HAVE_STRUCT_REG_R_FS 1 +/* Define to 1 if you have the declaration of `free', and to 0 if you don't. + */ +#define HAVE_DECL_FREE 1 -/* Define if your struct stat has st_blocks. */ -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't. + */ +#define HAVE_DECL_GETOPT 1 -/* Define if your struct reg has r_gs. */ -#define HAVE_STRUCT_REG_R_GS 1 +/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't. + */ +#define HAVE_DECL_MALLOC 1 -/* Define if exists and defines struct link_map which has - members with an ``l_'' prefix. (For Solaris, SVR4, and - SVR4-like systems.) */ -#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 +/* Define to 1 if you have the declaration of `ptrace', and to 0 if you don't. + */ +#define HAVE_DECL_PTRACE 1 -/* Define if exists and defines struct link_map which has - members with an ``lm_'' prefix. (For SunOS.) */ -/* #undef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */ +/* Define to 1 if you have the declaration of `realloc', and to 0 if you + don't. */ +#define HAVE_DECL_REALLOC 1 -/* Define if exists and defines a struct so_map which has - members with an ``som_'' prefix. (Found on older *BSD systems.) */ -/* #undef HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */ +/* Define to 1 if you have the declaration of `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 -/* Define if has struct link_map32 */ -/* #undef HAVE_STRUCT_LINK_MAP32 */ +/* Define to 1 if you have the declaration of `strerror', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR 1 -/* Define if has link_map32 (solaris sparc-64 target) */ -/* #undef _SYSCALL32 */ +/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't. + */ +#define HAVE_DECL_STRSTR 1 -/* Define if the prfpregset_t type is broken. */ -/* #undef PRFPREGSET_T_BROKEN */ +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VSNPRINTF 1 -/* Define if you want to use new multi-fd /proc interface - (replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */ -/* #undef NEW_PROC_API */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 -/* Define if ioctl argument PIOCSET is available. */ -/* #undef HAVE_PROCFS_PIOCSET */ +/* Define if ELF support should be included. */ +#define HAVE_ELF 1 -/* Define if the `long long' type works. */ -#define CC_HAS_LONG_LONG 1 +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 -/* Define if the "ll" format works to print long long ints. */ -#define PRINTF_HAS_LONG_LONG 1 +/* Define if has fpregset_t. */ +#define HAVE_FPREGSET_T 1 -/* Define if the "%Lg" format works to print long doubles. */ -#define PRINTF_HAS_LONG_DOUBLE 1 +/* Define to 1 if you have the `getgid' function. */ +#define HAVE_GETGID 1 -/* Define if the "%Lg" format works to scan long doubles. */ -#define SCANF_HAS_LONG_DOUBLE 1 +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 -/* Define if using Solaris thread debugging. */ -/* #undef HAVE_THREAD_DB_LIB */ +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 -/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */ -/* #undef START_INFERIOR_TRAPS_EXPECTED */ -/* #undef sys_quotactl */ +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 -/* Define if you have HPUX threads */ -/* #undef HAVE_HPUX_THREAD_SUPPORT */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GNU_LIBC_VERSION_H */ -/* Define if on solaris uses int instead of - size_t, and assorted other type changes. */ -/* #undef PROC_SERVICE_IS_OLD */ +/* Define if has gregset_t. */ +#define HAVE_GREGSET_T 1 -/* Define if the simulator is being linked in. */ -#define WITH_SIM 1 +/* Define if you have HPUX threads */ +/* #undef HAVE_HPUX_THREAD_SUPPORT */ -/* Set to true if the save_state_t structure is present */ -/* #undef HAVE_STRUCT_SAVE_STATE_T */ +/* Define if you have the iconv() function. */ +#define HAVE_ICONV 1 -/* Set to true if the save_state_t structure has the ss_wide member */ -/* #undef HAVE_STRUCT_MEMBER_SS_WIDE */ +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 -/* Define if defines the PTRACE_GETREGS request. */ -/* #undef HAVE_PTRACE_GETREGS */ +/* Define to 1 if you have the `dl' library (-ldl). */ +/* #undef HAVE_LIBDL */ -/* Define if defines the PTRACE_GETFPXREGS request. */ -/* #undef HAVE_PTRACE_GETFPXREGS */ +/* Define if you have the expat library. */ +/* #undef HAVE_LIBEXPAT */ -/* Define if defines the PT_GETDBREGS request. */ -#define HAVE_PT_GETDBREGS 1 - -/* Define if defines the PT_GETXMMREGS request. */ -/* #undef HAVE_PT_GETXMMREGS */ +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 -/* Define if libunwind library is being used. */ +/* Define if libunwind library is being used. */ /* #undef HAVE_LIBUNWIND */ -/* hostfile */ -#define GDB_XM_FILE config/i386/xm-i386.h +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBUNWIND_H */ -/* targetfile */ -#define GDB_TM_FILE config/i386/tm-fbsd.h +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBUNWIND_IA64_H */ -/* nativefile */ -#define GDB_NM_FILE config/i386/nm-fbsd.h +/* Define to 1 if you have the `w' library (-lw). */ +/* #undef HAVE_LIBW */ -/* Define to 1 so gets a definition of anon_hdl. Works - around a problem on IRIX 5. */ -#ifndef _KMEMUSER -/* #undef _KMEMUSER */ -#endif +/* Define to 1 if you have the header file. */ +#define HAVE_LINK_H 1 -/* Define if you have the __argz_count function. */ -/* #undef HAVE___ARGZ_COUNT */ +/* Define to 1 if the compiler supports long double. */ +#define HAVE_LONG_DOUBLE 1 -/* Define if you have the __argz_next function. */ -/* #undef HAVE___ARGZ_NEXT */ +/* Define if has lwpid_t. */ +#define HAVE_LWPID_T 1 -/* Define if you have the __argz_stringify function. */ -/* #undef HAVE___ARGZ_STRINGIFY */ +/* Define to 1 if you have the header file. */ +#define HAVE_MACHINE_REG_H 1 -/* Define if you have the _mcleanup function. */ -#define HAVE__MCLEANUP 1 +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 -/* Define if you have the canonicalize_file_name function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 -/* Define if you have the dcgettext function. */ -/* #undef HAVE_DCGETTEXT */ +/* Define to 1 if you have the `monstartup' function. */ +#define HAVE_MONSTARTUP 1 -/* Define if you have the getcwd function. */ -#define HAVE_GETCWD 1 +/* Define to 1 if you have the header file. */ +#define HAVE_NCURSES_H 1 -/* Define if you have the getpagesize function. */ -#define HAVE_GETPAGESIZE 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NCURSES_NCURSES_H */ -/* Define if you have the monstartup function. */ -#define HAVE_MONSTARTUP 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NCURSES_TERM_H */ -/* Define if you have the munmap function. */ -#define HAVE_MUNMAP 1 +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ -/* Define if you have the poll function. */ +/* Define to 1 if you have the header file. */ +#define HAVE_NLIST_H 1 + +/* Define to 1 if you have the `poll' function. */ #define HAVE_POLL 1 -/* Define if you have the pread64 function. */ +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `pread64' function. */ /* #undef HAVE_PREAD64 */ -/* Define if you have the putenv function. */ -#define HAVE_PUTENV 1 +/* Define if has prfpregset32_t. */ +/* #undef HAVE_PRFPREGSET32_T */ -/* Define if you have the realpath function. */ -#define HAVE_REALPATH 1 +/* Define if has prfpregset_t. */ +#define HAVE_PRFPREGSET_T 1 -/* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* Define if has prgregset32_t. */ +/* #undef HAVE_PRGREGSET32_T */ -/* Define if you have the setenv function. */ -#define HAVE_SETENV 1 +/* Define if has prgregset_t. */ +#define HAVE_PRGREGSET_T 1 -/* Define if you have the setlocale function. */ -#define HAVE_SETLOCALE 1 +/* Define if ioctl argument PIOCSET is available. */ +/* #undef HAVE_PROCFS_PIOCSET */ -/* Define if you have the setpgid function. */ -#define HAVE_SETPGID 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PROC_SERVICE_H */ -/* Define if you have the setpgrp function. */ -#define HAVE_SETPGRP 1 +/* Define if has prrun_t. */ +/* #undef HAVE_PRRUN_T */ -/* Define if you have the sigaction function. */ -#define HAVE_SIGACTION 1 +/* Define if has prsysent_t. */ +/* #undef HAVE_PRSYSENT_T */ -/* Define if you have the sigprocmask function. */ -#define HAVE_SIGPROCMASK 1 +/* Define if has pr_sigaction64_t. */ +/* #undef HAVE_PR_SIGACTION64_T */ -/* Define if you have the sigsetmask function. */ -#define HAVE_SIGSETMASK 1 +/* Define if has pr_siginfo64_t. */ +/* #undef HAVE_PR_SIGINFO64_T */ -/* Define if you have the socketpair function. */ -#define HAVE_SOCKETPAIR 1 +/* Define if has pr_sigset_t. */ +/* #undef HAVE_PR_SIGSET_T */ -/* Define if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ +/* Define if has psaddr_t. */ +#define HAVE_PSADDR_T 1 -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 +/* Define if has pstatus_t. */ +/* #undef HAVE_PSTATUS_T */ -/* Define if you have the strchr function. */ -#define HAVE_STRCHR 1 +/* Define if sys/ptrace.h defines the PTRACE_GETFPXREGS request. */ +/* #undef HAVE_PTRACE_GETFPXREGS */ -/* Define if you have the syscall function. */ -#define HAVE_SYSCALL 1 +/* Define if sys/ptrace.h defines the PTRACE_GETREGS request. */ +/* #undef HAVE_PTRACE_GETREGS */ -/* Define if you have the header file. */ -/* #undef HAVE_ARGZ_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTRACE_H */ -/* Define if you have the header file. */ -#define HAVE_CTYPE_H 1 +/* Define if sys/ptrace.h defines the PT_GETDBREGS request. */ +#define HAVE_PT_GETDBREGS 1 -/* Define if you have the header file. */ -#define HAVE_CURSES_H 1 +/* Define if sys/ptrace.h defines the PT_GETXMMREGS request. */ +/* #undef HAVE_PT_GETXMMREGS */ -/* Define if you have the header file. */ -#define HAVE_DIRENT_H 1 +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 -/* Define if you have the header file. */ -/* #undef HAVE_GNU_LIBC_VERSION_H */ +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 -/* Define if you have the header file. */ -/* #undef HAVE_LIBUNWIND_IA64_H */ +/* Define to 1 if you have the `setpgid' function. */ +#define HAVE_SETPGID 1 -/* Define if you have the header file. */ -/* #undef HAVE_LIBUNWIND_H */ +/* Define to 1 if you have the `setpgrp' function. */ +#define HAVE_SETPGRP 1 -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SGTTY_H 1 -/* Define if you have the header file. */ -#define HAVE_LINK_H 1 +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 -/* Define if you have the header file. */ -#define HAVE_MACHINE_REG_H 1 +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 -/* Define if you have the header file. */ -/* #undef HAVE_MALLOC_H */ +/* Define if sigsetjmp is available. */ +#define HAVE_SIGSETJMP 1 -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 +/* Define to 1 if you have the `sigsetmask' function. */ +#define HAVE_SIGSETMASK 1 -/* Define if you have the header file. */ -#define HAVE_NCURSES_H 1 +/* Define to 1 if you have the `socketpair' function. */ +#define HAVE_SOCKETPAIR 1 -/* Define if you have the header file. */ -/* #undef HAVE_NDIR_H */ +/* Define to 1 if the system has the type `socklen_t'. */ +#define HAVE_SOCKLEN_T 1 -/* Define if you have the header file. */ -#define HAVE_NL_TYPES_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 -/* Define if you have the header file. */ -#define HAVE_NLIST_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 -/* Define if you have the header file. */ -#define HAVE_POLL_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_PROC_SERVICE_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_PTRACE_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 -/* Define if you have the header file. */ -#define HAVE_SGTTY_H 1 +/* Define if has struct link_map32 */ +/* #undef HAVE_STRUCT_LINK_MAP32 */ -/* Define if you have the header file. */ -#define HAVE_STDDEF_H 1 +/* Define if exists and defines struct link_map which has members + with an ``lm_'' prefix. (For SunOS.) */ +/* #undef HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS */ -/* Define if you have the header file. */ -#define HAVE_STDINT_H 1 +/* Define if exists and defines struct link_map which has members + with an ``l_'' prefix. (For Solaris, SVR4, and SVR4-like systems.) */ +#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 +/* Define to 1 if your system has struct lwp. */ +/* #undef HAVE_STRUCT_LWP */ -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 +/* Define to 1 if your system has struct reg in . */ +#define HAVE_STRUCT_REG 1 -/* Define if you have the header file. */ -#define HAVE_STRINGS_H 1 +/* Define to 1 if `r_fs' is member of `struct reg'. */ +#define HAVE_STRUCT_REG_R_FS 1 + +/* Define to 1 if `r_gs' is member of `struct reg'. */ +#define HAVE_STRUCT_REG_R_GS 1 + +/* Define if exists and defines a struct so_map which has members + with an ``som_'' prefix. (Found on older *BSD systems.) */ +/* #undef HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS */ + +/* Define to 1 if `st_blksize' is member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 -/* Define if you have the header file. */ +/* Define to 1 if `st_blocks' is member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 + +/* Define to 1 if `td_pcb' is member of `struct thread'. */ +/* #undef HAVE_STRUCT_THREAD_TD_PCB */ + +/* Define to 1 if you have the `syscall' function. */ +#define HAVE_SYSCALL 1 + +/* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_DEBUGREG_H */ -/* Define if you have the header file. */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ /* #undef HAVE_SYS_DIR_H */ -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_FAULT_H */ -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_FILE_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_FILIO_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ /* #undef HAVE_SYS_NDIR_H */ -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_POLL_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_SYS_PROC_H */ - -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_PROCFS_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PROC_H */ + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_PTRACE_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_SYS_REG_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_REG_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_SYSCALL_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_USER_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_SYS_WAIT_H 1 -/* Define if you have the header file. */ -#define HAVE_TERM_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_TERMIOS_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_TERMIO_H */ -/* Define if you have the header file. */ -#define HAVE_TERMIOS_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_TERM_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_THREAD_DB_H */ -/* Define if you have the header file. */ +/* Define if using Solaris thread debugging. */ +/* #undef HAVE_THREAD_DB_LIB */ + +/* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 -/* Define if you have the header file. */ +/* Define if you support the tkill syscall. */ +/* #undef HAVE_TKILL_SYSCALL */ + +/* Define to 1 if you have the `ttrace' function. */ +/* #undef HAVE_TTRACE */ + +/* Define to 1 if the system has the type `uintptr_t'. */ +#define HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_VALUES_H */ +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ /* #undef HAVE_WAIT_H */ -/* Define if you have the dl library (-ldl). */ -/* #undef HAVE_LIBDL */ +/* Define to 1 if you have the `wborder' function. */ +#define HAVE_WBORDER 1 -/* Define if you have the m library (-lm). */ -#define HAVE_LIBM 1 +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 -/* Define if you have the w library (-lw). */ -/* #undef HAVE_LIBW */ +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 -/* Define if you have the stpcpy function */ -/* #undef HAVE_STPCPY */ +/* Define to 1 if you have the `XML_StopParser' function. */ +/* #undef HAVE_XML_STOPPARSER */ -/* Define if your locale.h file contains LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 +/* Define to 1 if your system has the _etext variable. */ +#define HAVE__ETEXT 1 -/* Define to 1 if NLS is requested */ -/* #undef ENABLE_NLS */ +/* Define to 1 if you have the `_mcleanup' function. */ +#define HAVE__MCLEANUP 1 -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ -/* #undef HAVE_GETTEXT */ +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST -/* Name of this package. */ -#define PACKAGE "gdb" +/* Define if you want to use new multi-fd /proc interface (replaces + HAVE_MULTIPLE_PROC_FDS as well as other macros). */ +/* #undef NEW_PROC_API */ -/* Global directory for separate debug files. */ -#define DEBUGDIR "/usr/lib/debug" +/* Name of this package. */ +#define PACKAGE "gdb" -/* Define to BFD's default architecture. */ -#define DEFAULT_BFD_ARCH bfd_i386_arch +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" -/* Define to BFD's default target vector. */ -#define DEFAULT_BFD_VEC bfd_elf32_i386_freebsd_vec +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" -/* Define to 1 if your system has the _etext variable. */ -#define HAVE__ETEXT 1 +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" -/* Define to 1 to avoid a clash between and on - Solaris 2.[789] when using GCC. */ -/* #undef _MSE_INT_H */ +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" -/* Define to 1 if we found this declaration otherwise define to 0. */ -#define HAVE_DECL_GETOPT 0 +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" -/* Define if sigsetjmp is available. */ -#define HAVE_SIGSETJMP 1 +/* Define if the prfpregset_t type is broken. */ +/* #undef PRFPREGSET_T_BROKEN */ -/* Define to 1 if the regex included in libiberty should be used. */ -#define USE_INCLUDED_REGEX 1 +/* Define to 1 if the "%Lg" format works to print long doubles. */ +#define PRINTF_HAS_LONG_DOUBLE 1 -/* Define to 1 if your system has td_pcb in struct thread. */ -/* #undef HAVE_STRUCT_THREAD_TD_PCB */ +/* Define to 1 if the "%ll" format works to print long longs. */ +#define PRINTF_HAS_LONG_LONG 1 -/* Define to 1 if your system has struct reg in . */ -#define HAVE_STRUCT_REG 1 +/* Define if on solaris uses int instead of size_t, and + assorted other type changes. */ +/* #undef PROC_SERVICE_IS_OLD */ -/* Define if provides the uintptr_t type. */ -#define HAVE_UINTPTR_T 1 +/* Define to the type of arg 3 for ptrace. */ +#define PTRACE_TYPE_ARG3 caddr_t -/* Define if malloc is not declared in system header files. */ -/* #undef NEED_DECLARATION_MALLOC */ +/* Define to the type of arg 5 for ptrace. */ +/* #undef PTRACE_TYPE_ARG5 */ -/* Define if realloc is not declared in system header files. */ -/* #undef NEED_DECLARATION_REALLOC */ +/* Define as the return type of ptrace. */ +#define PTRACE_TYPE_RET int -/* Define if free is not declared in system header files. */ -/* #undef NEED_DECLARATION_FREE */ +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void -/* Define if strerror is not declared in system header files. */ -/* #undef NEED_DECLARATION_STRERROR */ +/* Define to 1 if the "%Lg" format works to scan long doubles. */ +#define SCANF_HAS_LONG_DOUBLE 1 -/* Define if strdup is not declared in system header files. */ -/* #undef NEED_DECLARATION_STRDUP */ +/* Define to 1 if the `setpgrp' function takes no argument. */ +/* #undef SETPGRP_VOID */ -/* Define if strstr is not declared in system header files. */ -/* #undef NEED_DECLARATION_STRSTR */ +/* The size of a `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ -/* Define if canonicalize_file_name is not declared in system header files. */ -#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 +/* The size of a `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ -/* Define if has pstatus_t. */ -/* #undef HAVE_PSTATUS_T */ +/* The size of a `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ -/* Define if has prrun_t. */ -/* #undef HAVE_PRRUN_T */ +/* The size of a `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ -/* Define if has gregset_t. */ -#define HAVE_GREGSET_T 1 +/* The size of a `void *', as computed by sizeof. */ +/* #undef SIZEOF_VOID_P */ -/* Define if has fpregset_t. */ -#define HAVE_FPREGSET_T 1 +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ -/* Define if has prgregset_t. */ -/* #undef HAVE_PRGREGSET_T */ +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ -/* Define if has prfpregset_t. */ -#define HAVE_PRFPREGSET_T 1 +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 -/* Define if has prgregset32_t. */ -/* #undef HAVE_PRGREGSET32_T */ +/* Define if has the TD_NOTALLOC error code. */ +/* #undef THREAD_DB_HAS_TD_NOTALLOC */ -/* Define if has prfpregset32_t. */ -/* #undef HAVE_PRFPREGSET32_T */ +/* Define if has the TD_NOTLS error code. */ +/* #undef THREAD_DB_HAS_TD_NOTLS */ -/* Define if has lwpid_t. */ -/* #undef HAVE_LWPID_T */ +/* Define if has the TD_VERSION error code. */ +/* #undef THREAD_DB_HAS_TD_VERSION */ -/* Define if has psaddr_t. */ -/* #undef HAVE_PSADDR_T */ +/* Define to 1 if the regex included in libiberty should be used. */ +#define USE_INCLUDED_REGEX 1 -/* Define if has prsysent_t. */ -/* #undef HAVE_PRSYSENT_T */ +/* Define if we should use the Windows API, instead of the POSIX API. On + Windows, we use the Windows API when building for MinGW, but the POSIX API + when building for Cygwin. */ +/* #undef USE_WIN32API */ -/* Define if has pr_sigset_t. */ -/* #undef HAVE_PR_SIGSET_T */ +/* Define if the simulator is being linked in. */ +#define WITH_SIM 1 -/* Define if has pr_sigaction64_t. */ -/* #undef HAVE_PR_SIGACTION64_T */ +/* Define to 1 if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +/* # undef _ALL_SOURCE */ +#endif -/* Define if has pr_siginfo64_t. */ -/* #undef HAVE_PR_SIGINFO64_T */ +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif -/* Define if has the TD_NOTALLOC error code. */ -/* #undef THREAD_DB_HAS_TD_NOTALLOC */ +/* Define to 1 so gets a definition of anon_hdl. Works around a + problem on IRIX 5. */ +/* #undef _KMEMUSER */ -/* Define if we can use the tkill syscall. */ -/* #undef HAVE_TKILL_SYSCALL */ +/* Define to 1 to avoid a clash between and on Solaris + 2.[789] when using GCC. */ +/* #undef _MSE_INT_H */ -/* Define to the default OS ABI for this configuration. */ -/* #undef GDB_OSABI_DEFAULT */ +/* Define if has link_map32 (solaris sparc-64 target) */ +/* #undef _SYSCALL32 */ -/* Define to be a string naming the default host character set. */ -#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1" +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ -/* Define if you have the iconv() function. */ -/* #undef HAVE_ICONV */ +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif -/* Define as const if the declaration of iconv() needs const. */ -/* #undef ICONV_CONST */ +/* Define to `int' if does not define. */ +/* #undef pid_t */ +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ diff --git a/gnu/usr.bin/gdb/libgdb/nm-dragonfly.h b/gnu/usr.bin/gdb/libgdb/nm-dragonfly.h deleted file mode 100644 index d9355a48ec..0000000000 --- a/gnu/usr.bin/gdb/libgdb/nm-dragonfly.h +++ /dev/null @@ -1,125 +0,0 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libgdb/Attic/nm-dragonfly.h,v 1.1 2007/02/26 13:14:04 corecode Exp $ */ -/* Native-dependent definitions for FreeBSD/i386. - - Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1997, 2000, 2001, 2004 - Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef NM_DRAGONFLY_H -#define NM_DRAGONFLY_H - -#ifdef HAVE_PT_GETDBREGS -#define I386_USE_GENERIC_WATCHPOINTS -#endif - -#include "i386/nm-i386.h" - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -/* Provide access to the i386 hardware debugging registers. */ - -#define I386_DR_LOW_SET_CONTROL(control) \ - i386bsd_dr_set_control (control) -extern void i386bsd_dr_set_control (unsigned long control); - -#define I386_DR_LOW_SET_ADDR(regnum, addr) \ - i386bsd_dr_set_addr (regnum, addr) -extern void i386bsd_dr_set_addr (int regnum, CORE_ADDR addr); - -#define I386_DR_LOW_RESET_ADDR(regnum) \ - i386bsd_dr_reset_addr (regnum) -extern void i386bsd_dr_reset_addr (int regnum); - -#define I386_DR_LOW_GET_STATUS() \ - i386bsd_dr_get_status () -extern unsigned long i386bsd_dr_get_status (void); - - -/* Get generic BSD native definitions. */ -#include "config/nm-bsd.h" - -/* Override child_resume in `infptrace.c' to work around a kernel bug. */ -#define CHILD_RESUME - -/* Override child_pid_to_exec_file in 'inftarg.c'. */ -#define CHILD_PID_TO_EXEC_FILE - - -/* Shared library support. */ - -#include "solib.h" - -/* Make structure definitions match up with those expected in - `solib-sunos.c'. */ - -#define link_object sod -#define lo_name sod_name -#define lo_library sod_library -#define lo_unused sod_reserved -#define lo_major sod_major -#define lo_minor sod_minor -#define lo_next sod_next - -#define link_map so_map -#define lm_addr som_addr -#define lm_name som_path -#define lm_next som_next -#define lm_lop som_sod -#define lm_lob som_sodbase -#define lm_rwt som_write -#define lm_ld som_dynamic -#define lm_lpd som_spd - -#define link_dynamic_2 section_dispatch_table -#define ld_loaded sdt_loaded -#define ld_need sdt_sods -#define ld_rules sdt_filler1 -#define ld_got sdt_got -#define ld_plt sdt_plt -#define ld_rel sdt_rel -#define ld_hash sdt_hash -#define ld_stab sdt_nzlist -#define ld_stab_hash sdt_filler2 -#define ld_buckets sdt_buckets -#define ld_symbols sdt_strings -#define ld_symb_size sdt_str_sz -#define ld_text sdt_text_sz -#define ld_plt_sz sdt_plt_sz - -#define rtc_symb rt_symbol -#define rtc_sp rt_sp -#define rtc_next rt_next - -#define ld_debug so_debug -#define ldd_version dd_version -#define ldd_in_debugger dd_in_debugger -#define ldd_sym_loaded dd_sym_loaded -#define ldd_bp_addr dd_bpt_addr -#define ldd_bp_inst dd_bpt_shadow -#define ldd_cp dd_cc - -#define link_dynamic _dynamic -#define ld_version d_version -#define ldd d_debug -#define ld_un d_un -#define ld_2 d_sdt - -#endif /* nm-dragonfly.h */ diff --git a/gnu/usr.bin/gdb/libgdb/version.c b/gnu/usr.bin/gdb/libgdb/version.c index e354a44822..3fc81b9831 100644 --- a/gnu/usr.bin/gdb/libgdb/version.c +++ b/gnu/usr.bin/gdb/libgdb/version.c @@ -1,5 +1,5 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libgdb/version.c,v 1.1 2006/03/07 15:48:11 corecode Exp $ */ +/* $DragonFly: src/gnu/usr.bin/gdb/libgdb/version.c,v 1.2 2008/01/14 21:36:38 corecode Exp $ */ #include "version.h" -const char version[] = "6.2.1"; -const char host_name[] = "i386-dragonfly"; -const char target_name[] = "i386-dragonfly"; +const char version[] = "6.7.1"; +const char host_name[] = MACHINE_ARCH"-dragonfly"; +const char target_name[] = MACHINE_ARCH"-dragonfly"; diff --git a/gnu/usr.bin/gdb/libiberty/Makefile b/gnu/usr.bin/gdb/libiberty/Makefile index b04d306d93..f225aac1ec 100644 --- a/gnu/usr.bin/gdb/libiberty/Makefile +++ b/gnu/usr.bin/gdb/libiberty/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/gnu/usr.bin/gdb/libiberty/Makefile,v 1.1 2004/10/23 17:02:38 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/gdb/libiberty/Makefile,v 1.2 2008/01/14 21:36:39 corecode Exp $ .include "../Makefile.inc" @@ -10,10 +10,11 @@ CONTRIBDIR= ${BASEDIR}/libiberty CFLAGS+= -I${BASEDIR}/include -I${.CURDIR} -DHAVE_CONFIG_H -SRCS= cp-demangle.c cplus-dem.c floatformat.c getopt.c +SRCS= cp-demangle.c cplus-dem.c cp-demint.c floatformat.c getopt.c SRCS+= getopt1.c getruntime.c hashtab.c objalloc.c obstack.c SRCS+= regex.c safe-ctype.c splay-tree.c SRCS+= argv.c concat.c hex.c lbasename.c xexit.c xstrdup.c xstrerror.c +SRCS+= lrealpath.c make-relative-prefix.c filename_cmp.c stpcpy.c unlink-if-ordinary.c .include diff --git a/gnu/usr.bin/gdb/libiberty/config.h b/gnu/usr.bin/gdb/libiberty/config.h index a03a0f8d6f..33f02f7835 100644 --- a/gnu/usr.bin/gdb/libiberty/config.h +++ b/gnu/usr.bin/gdb/libiberty/config.h @@ -1,10 +1,7 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libiberty/config.h,v 1.1 2004/10/23 17:02:38 joerg Exp $ */ +/* $DragonFly: src/gnu/usr.bin/gdb/libiberty/config.h,v 1.2 2008/01/14 21:36:39 corecode Exp $ */ /* config.h. Generated by configure. */ /* config.in. Generated from configure.ac by autoheader. */ -/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ -#define BYTEORDER 1234 - /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ /* #undef CRAY_STACKSEG_END */ @@ -42,6 +39,57 @@ /* Define to 1 if you have the `clock' function. */ #define HAVE_CLOCK 1 +/* Define to 1 if you have the declaration of `asprintf', and to 0 if you + don't. */ +#define HAVE_DECL_ASPRINTF 1 + +/* Define to 1 if you have the declaration of `basename', and to 0 if you + don't. */ +#define HAVE_DECL_BASENAME 0 + +/* Define to 1 if you have the declaration of `calloc', and to 0 if you don't. + */ +#define HAVE_DECL_CALLOC 1 + +/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */ +#define HAVE_DECL_FFS 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't. + */ +#define HAVE_DECL_GETOPT 1 + +/* Define to 1 if you have the declaration of `malloc', and to 0 if you don't. + */ +#define HAVE_DECL_MALLOC 1 + +/* Define to 1 if you have the declaration of `realloc', and to 0 if you + don't. */ +#define HAVE_DECL_REALLOC 1 + +/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't. + */ +#define HAVE_DECL_SBRK 1 + +/* Define to 1 if you have the declaration of `snprintf', and to 0 if you + don't. */ +#define HAVE_DECL_SNPRINTF 1 + +/* Define to 1 if you have the declaration of `strverscmp', and to 0 if you + don't. */ +#define HAVE_DECL_STRVERSCMP 0 + +/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VASPRINTF 1 + +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#define HAVE_DECL_VSNPRINTF 1 + /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 @@ -153,6 +201,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDIO_EXT_H */ + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 @@ -183,6 +234,9 @@ /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 +/* Define to 1 if you have the `strndup' function. */ +/* #undef HAVE_STRNDUP */ + /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 @@ -201,6 +255,9 @@ /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if you have the `strverscmp' function. */ +/* #undef HAVE_STRVERSCMP */ + /* Define to 1 if you have the `sysconf' function. */ #define HAVE_SYSCONF 1 @@ -300,6 +357,12 @@ /* Define to 1 if you have the `vsprintf' function. */ #define HAVE_VSPRINTF 1 +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + /* Define to 1 if you have the `waitpid' function. */ #define HAVE_WAITPID 1 @@ -315,9 +378,8 @@ /* Define if you have the _system_configuration variable. */ /* #undef HAVE__SYSTEM_CONFIGURATION */ -/* Define if the host machine stores words of multi-word integers in - big-endian order. */ -/* #undef HOST_WORDS_BIG_ENDIAN */ +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ /* Define if canonicalize_file_name is not declared in system header files. */ #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1 @@ -343,6 +405,9 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION "" +/* The size of a `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + /* Define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses @@ -358,7 +423,8 @@ /* Define to an unsigned 64-bit type available in the compiler. */ #define UNSIGNED_64BIT_TYPE uint64_t -/* whether byteorder is bigendian */ +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ /* #undef WORDS_BIGENDIAN */ /* Define to empty if `const' does not conform to ANSI C. */ diff --git a/gnu/usr.bin/gdb/libopcodes/config.h b/gnu/usr.bin/gdb/libopcodes/config.h index 73401d3e02..643bb592ef 100644 --- a/gnu/usr.bin/gdb/libopcodes/config.h +++ b/gnu/usr.bin/gdb/libopcodes/config.h @@ -1,140 +1,78 @@ -/* $DragonFly: src/gnu/usr.bin/gdb/libopcodes/config.h,v 1.1 2004/10/23 17:02:38 joerg Exp $ */ -/* config.h. Generated automatically by configure. */ -/* config.in. Generated automatically from configure.in by autoheader. */ +/* $DragonFly: src/gnu/usr.bin/gdb/libopcodes/config.h,v 1.2 2008/01/14 21:36:39 corecode Exp $ */ +/* config.h. Generated by configure. */ +/* config.in. Generated from configure.in by autoheader. */ -/* Define if using alloca.c. */ -/* #undef C_ALLOCA */ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if you have alloca, as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define if you have and it should be used (not on Ultrix). */ -/* #undef HAVE_ALLOCA_H */ - -/* Define if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define as __inline if that's what the C compiler calls it. */ -/* #undef inline */ - -/* Define to `long' if doesn't define. */ -/* #undef off_t */ - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -/* #undef STACK_DIRECTION */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you have the __argz_count function. */ -/* #undef HAVE___ARGZ_COUNT */ - -/* Define if you have the __argz_next function. */ -/* #undef HAVE___ARGZ_NEXT */ - -/* Define if you have the __argz_stringify function. */ -/* #undef HAVE___ARGZ_STRINGIFY */ - -/* Define if you have the dcgettext function. */ -/* #undef HAVE_DCGETTEXT */ - -/* Define if you have the getcwd function. */ -#define HAVE_GETCWD 1 - -/* Define if you have the getpagesize function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if you have the munmap function. */ -#define HAVE_MUNMAP 1 - -/* Define if you have the putenv function. */ -#define HAVE_PUTENV 1 - -/* Define if you have the setenv function. */ -#define HAVE_SETENV 1 - -/* Define if you have the setlocale function. */ -#define HAVE_SETLOCALE 1 - -/* Define if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ - -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ -/* Define if you have the strchr function. */ -#define HAVE_STRCHR 1 +/* Define to 1 if you have the declaration of `basename', and to 0 if you + don't. */ +#define HAVE_DECL_BASENAME 0 -/* Define if you have the header file. */ -/* #undef HAVE_ARGZ_H */ +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#define HAVE_DECL_STPCPY 0 -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_MALLOC_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 -/* Define if you have the header file. */ -#define HAVE_NL_TYPES_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_SYS_STAT_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_SYS_TYPES_H */ +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 -/* Define if you have the header file. */ -/* #undef HAVE_VALUES_H */ +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "opcodes" -/* Version number of package */ -#define VERSION "2.15.91" +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" -/* Define if you have the stpcpy function */ -/* #undef HAVE_STPCPY */ +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" -/* Define if your locale.h file contains LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" -/* Define to 1 if NLS is requested */ -/* #undef ENABLE_NLS */ +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ -/* #undef HAVE_GETTEXT */ +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "2.18.50" +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif -- 2.41.0