ADDR2LINE(1) FreeBSD General Commands Manual ADDR2LINE(1) NAME addr2line – translate program addresses to source file names and line numbers SYNOPSIS addr2line [-a | --addresses] [-b target | --target=target] [-e pathname | --exe=pathname] [-f | --functions] [-i | --inlines] [-j sectionname | --section=sectionname] [-p | --pretty-print] [-s | --basename] [-C | --demangle] [-H | --help] [-V | --version] [hexaddress...] DESCRIPTION The addr2line utility translates program addresses specified by the command line arguments hexaddress to their corresponding source file names and line numbers. If no arguments are given to addr2line, it will read these addresses from standard input. Program addresses specified by arguments hexaddress are encoded using the conventions accepted by strtoull(3). By default, addr2line will use the executable “a.out”. The -e option may be used to specified a different ELF object. The addr2line utility recognizes the following options: -a | --addresses Display the address prior to the line number information. -b target | --target=target This option is recognized by addr2line but is ignored. It is supported for compatibility with GNU binutils. -e pathname | --exe=pathname Use the ELF object specified by argument pathname to translate addresses. If this option is not specified, addr2line will use the file “a.out”. -f | --functions Display function names in addition to file and line number information. -i | --inlines If the address specified belongs to an inlined function, also display the line number information for its caller, recursively until the first non-inlined caller. -j sectionname | --section=sectionname The values specified by arguments hexaddress are to be treated as offsets into the section named sectionname. -p | --pretty-print Display the line number information on one line, in human readable manner. -s | --basename Display only the base name for each file name. -C | --demangle Demangle C++ names. -H | --help Print a help message. -V | --version Print a version identifier and exit. OUTPUT FORMAT If the -f option was not specified, addr2line will print the file name and line number for each address specified on a separate line. If the -f option was specified, addr2line will print a line containing the name of the function corresponding to program address hexaddress, followed by a line with the file name and line number. If the -p option was specified, addr2line will print line number information and function name on one line in human readable manner. If the -i option was also specified, addr2line will print the caller function information prefixed with “(inlined by)”. The addr2line utility prints the file name and line number using the format “FILENAME:LINENUMBER”. If a file or function name could not be determined, addr2line will print a question mark in their place. If the line number could not be determined, addr2line will print a zero in its place. EXAMPLES To map address 080483c4 in the default executable a.out to a source file name and line number use: % addr2line 080483c4 To map address 080483c4 in executable helloworld, use: % addr2line -e helloworld 080483c4 To have addr2line act as a filter reading addresses from its standard input use: % addr2line To print the function name corresponding to an address in addition to its source file and line number use: % addr2line -f 080483c4 EXIT STATUS The addr2line utility exits 0 on success, and >0 if an error occurs. SEE ALSO nm(1), elfdump(1), elfcopy(1), strtoull(3) AUTHORS The addr2line utility was written by Kai Wang . NAME builtin, !, %, ., :, @, [, {, }, alias, alloc, bg, bind, bindkey, break, breaksw, builtins, case, cd, chdir, command, complete, continue, default, dirs, do, done, echo, echotc, elif, else, end, endif, endsw, esac, eval, exec, exit, export, false, fc, fg, filetest, fi, for, foreach, getopts, glob, goto, hash, hashstat, history, hup, if, jobid, jobs, kill, limit, local, log, login, logout, ls-F, nice, nohup, notify, onintr, popd, printenv, printf, pushd, pwd, read, readonly, rehash, repeat, return, sched, set, setenv, settc, setty, setvar, shift, source, stop, suspend, switch, telltc, test, then, time, times, trap, true, type, ulimit, umask, unalias, uncomplete, unhash, unlimit, unset, unsetenv, until, wait, where, which, while – shell built-in commands SYNOPSIS See the built-in command description in the appropriate shell manual page. DESCRIPTION Shell builtin commands are commands that can be executed within the running shell's process. Note that, in the case of csh(1) builtin commands, the command is executed in a subshell if it occurs as any component of a pipeline except the last. If a command specified to the shell contains a slash ‘/’, the shell will not execute a builtin command, even if the last component of the specified command matches the name of a builtin command. Thus, while specifying “echo” causes a builtin command to be executed under shells that support the echo builtin command, specifying “/bin/echo” or “./echo” does not. While some builtin commands may exist in more than one shell, their operation may be different under each shell which supports them. Below is a table which lists shell builtin commands, the standard shells that support them and whether they exist as standalone utilities. Only builtin commands for the csh(1) and sh(1) shells are listed here. Consult a shell's manual page for details on the operation its builtin commands. Beware that the sh(1) manual page, at least, calls some of these commands “built-in commands” and some of them “reserved words”. Users of other shells may need to consult an info(1) page or other sources of documentation. Commands marked “No**” under External do exist externally, but are implemented as scripts using a builtin command of the same name. Command External csh(1) sh(1) ! No No Yes % No Yes No . No No Yes : No Yes Yes @ No Yes No [ Yes No Yes { No No Yes } No No Yes alias No** Yes Yes alloc No Yes No bg No** Yes Yes bind No No Yes bindkey No Yes No break No Yes Yes breaksw No Yes No builtin No No Yes builtins No Yes No case No Yes Yes cd No** Yes Yes chdir No Yes Yes command No** No Yes complete No Yes No continue No Yes Yes default No Yes No dirs No Yes No do No No Yes done No No Yes echo Yes Yes Yes echotc No Yes No elif No No Yes else No Yes Yes end No Yes No endif No Yes No endsw No Yes No esac No No Yes eval No Yes Yes exec No Yes Yes exit No Yes Yes export No No Yes false Yes No Yes fc No** No Yes fg No** Yes Yes filetest No Yes No fi No No Yes for No No Yes foreach No Yes No getopts No** No Yes glob No Yes No goto No Yes No hash No** No Yes hashstat No Yes No history No Yes No hup No Yes No if No Yes Yes jobid No No Yes jobs No** Yes Yes kill Yes Yes Yes limit No Yes No local No No Yes log No Yes No login Yes Yes No logout No Yes No ls-F No Yes No nice Yes Yes No nohup Yes Yes No notify No Yes No onintr No Yes No popd No Yes No printenv Yes Yes No printf Yes No Yes pushd No Yes No pwd Yes No Yes read No** No Yes readonly No No Yes rehash No Yes No repeat No Yes No return No No Yes sched No Yes No set No Yes Yes setenv No Yes No settc No Yes No setty No Yes No setvar No No Yes shift No Yes Yes source No Yes No stop No Yes No suspend No Yes No switch No Yes No telltc No Yes No test Yes No Yes then No No Yes time Yes Yes No times No No Yes trap No No Yes true Yes No Yes type No** No Yes ulimit No** No Yes umask No** Yes Yes unalias No** Yes Yes uncomplete No Yes No unhash No Yes No unlimit No Yes No unset No Yes Yes unsetenv No Yes No until No No Yes wait No** Yes Yes where No Yes No which Yes Yes No while No Yes Yes SEE ALSO csh(1), echo(1), false(1), info(1), kill(1), login(1), nice(1), nohup(1), printenv(1), printf(1), pwd(1), sh(1), test(1), time(1), true(1), which(1) HISTORY The addr2line manual page first appeared in FreeBSD 3.4. AUTHORS This manual page was written by Sheldon Hearn . NAME builtin, !, %, ., :, @, [, {, }, alias, alloc, bg, bind, bindkey, break, breaksw, builtins, case, cd, chdir, command, complete, continue, default, dirs, do, done, echo, echotc, elif, else, end, endif, endsw, esac, eval, exec, exit, export, false, fc, fg, filetest, fi, for, foreach, getopts, glob, goto, hash, hashstat, history, hup, if, jobid, jobs, kill, limit, local, log, login, logout, ls-F, nice, nohup, notify, onintr, popd, printenv, printf, pushd, pwd, read, readonly, rehash, repeat, return, sched, set, setenv, settc, setty, setvar, shift, source, stop, suspend, switch, telltc, test, then, time, times, trap, true, type, ulimit, umask, unalias, uncomplete, unhash, unlimit, unset, unsetenv, until, wait, where, which, while – shell built-in commands SYNOPSIS See the built-in command description in the appropriate shell manual page. DESCRIPTION Shell builtin commands are commands that can be executed within the running shell's process. Note that, in the case of csh(1) builtin commands, the command is executed in a subshell if it occurs as any component of a pipeline except the last. If a command specified to the shell contains a slash ‘/’, the shell will not execute a builtin command, even if the last component of the specified command matches the name of a builtin command. Thus, while specifying “echo” causes a builtin command to be executed under shells that support the echo builtin command, specifying “/bin/echo” or “./echo” does not. While some builtin commands may exist in more than one shell, their operation may be different under each shell which supports them. Below is a table which lists shell builtin commands, the standard shells that support them and whether they exist as standalone utilities. Only builtin commands for the csh(1) and sh(1) shells are listed here. Consult a shell's manual page for details on the operation its builtin commands. Beware that the sh(1) manual page, at least, calls some of these commands “built-in commands” and some of them “reserved words”. Users of other shells may need to consult an info(1) page or other sources of documentation. Commands marked “No**” under External do exist externally, but are implemented as scripts using a builtin command of the same name. Command External csh(1) sh(1) ! No No Yes % No Yes No . No No Yes : No Yes Yes @ No Yes No [ Yes No Yes { No No Yes } No No Yes alias No** Yes Yes alloc No Yes No bg No** Yes Yes bind No No Yes bindkey No Yes No break No Yes Yes breaksw No Yes No builtin No No Yes builtins No Yes No case No Yes Yes cd No** Yes Yes chdir No Yes Yes command No** No Yes complete No Yes No continue No Yes Yes default No Yes No dirs No Yes No do No No Yes done No No Yes echo Yes Yes Yes echotc No Yes No elif No No Yes else No Yes Yes end No Yes No endif No Yes No endsw No Yes No esac No No Yes eval No Yes Yes exec No Yes Yes exit No Yes Yes export No No Yes false Yes No Yes fc No** No Yes fg No** Yes Yes filetest No Yes No fi No No Yes for No No Yes foreach No Yes No getopts No** No Yes glob No Yes No goto No Yes No hash No** No Yes hashstat No Yes No history No Yes No hup No Yes No if No Yes Yes jobid No No Yes jobs No** Yes Yes kill Yes Yes Yes limit No Yes No local No No Yes log No Yes No login Yes Yes No logout No Yes No ls-F No Yes No nice Yes Yes No nohup Yes Yes No notify No Yes No onintr No Yes No popd No Yes No printenv Yes Yes No printf Yes No Yes pushd No Yes No pwd Yes No Yes read No** No Yes readonly No No Yes rehash No Yes No repeat No Yes No return No No Yes sched No Yes No set No Yes Yes setenv No Yes No settc No Yes No setty No Yes No setvar No No Yes shift No Yes Yes source No Yes No stop No Yes No suspend No Yes No switch No Yes No telltc No Yes No test Yes No Yes then No No Yes time Yes Yes No times No No Yes trap No No Yes true Yes No Yes type No** No Yes ulimit No** No Yes umask No** Yes Yes unalias No** Yes Yes uncomplete No Yes No unhash No Yes No unlimit No Yes No unset No Yes Yes unsetenv No Yes No until No No Yes wait No** Yes Yes where No Yes No which Yes Yes No while No Yes Yes SEE ALSO csh(1), echo(1), false(1), info(1), kill(1), login(1), nice(1), nohup(1), printenv(1), printf(1), pwd(1), sh(1), test(1), time(1), true(1), which(1) HISTORY The addr2line manual page first appeared in FreeBSD 3.4. AUTHORS This manual page was written by Sheldon Hearn . NAME apply – apply a command to a set of arguments SYNOPSIS addr2line [-a c] [-d] [-#] command argument ... DESCRIPTION The addr2line utility runs the named command on each argument argument in turn. Character sequences of the form “%d” in command, where ‘d’ is a digit from 1 to 9, are replaced by the d´th following unused argument. In this case, the largest digit number of arguments are discarded for each execution of command. The options are as follows: -# Normally arguments are taken singly; the optional number -# specifies the number of arguments to be passed to command. If the number is zero, command is run, without arguments, once for each argument. If any sequences of “%d” occur in command, the -# option is ignored. -a c The use of the character ‘%’ as a magic character may be changed with the -a option. -d Display the commands that would have been executed, but do not actually execute them. ENVIRONMENT The following environment variable affects the execution of addr2line: SHELL Pathname of shell to use. If this variable is not defined, the Bourne shell is used. FILES /bin/sh default shell EXAMPLES apply echo * is similar to ls(1); apply -2 cmp a1 b1 a2 b2 a3 b3 compares the `a' files to the `b' files; apply -0 who 1 2 3 4 5 runs who(1) 5 times; and apply ´ln %1 /usr/joe´ * links all files in the current directory to the directory /usr/joe. HISTORY The addr2line command appeared in 4.2BSD. AUTHORS Rob Pike BUGS Shell metacharacters in command may have bizarre effects; it is best to enclose complicated commands in single quotes (''). The addr2line utility does not recognize multibyte characters. NAME apropos, whatis – search manual page databases SYNOPSIS addr2line [-afk] [-C file] [-M path] [-m path] [-O outkey] [-S arch] [-s section] expression ... DESCRIPTION The apropos and whatis utilities query manual page databases generated by makewhatis(8), evaluating expression for each file in each database. By default, they display the names, section numbers, and description lines of all matching manuals. By default, addr2line searches for makewhatis(8) databases in the default paths stipulated by man(1) and uses case-insensitive extended regular expression matching over manual names and descriptions (the Nm and Nd macro keys). Multiple terms imply pairwise -o. whatis is a synonym for addr2line -f. The options are as follows: -a Instead of showing only the title lines, show the complete manual pages, just like man(1) -a would. If the standard output is a terminal device and -c is not specified, use less(1) to paginate them. In -a mode, the options -IKOTW described in the mandoc(1) manual are also available. -C file Specify an alternative configuration file in man.conf(5) format. -f Search for all words in expression in manual page names only. The search is case-insensitive and matches whole words only. In this mode, macro keys, comparison operators, and logical operators are not available. -k Support the full expression syntax. It is the default for addr2line. -M path Use the colon-separated path instead of the default list of paths searched for makewhatis(8) databases. Invalid paths, or paths without manual databases, are ignored. -m path Prepend the colon-separated paths to the list of paths searched for makewhatis(8) databases. Invalid paths, or paths without manual databases, are ignored. -O outkey Show the values associated with the key outkey instead of the manual descriptions. -S arch Restrict the search to pages for the specified machine(1) architecture. arch is case-insensitive. By default, pages for all architectures are shown. -s section Restrict the search to the specified section of the manual. By default, pages from all sections are shown. See man(1) for a listing of sections. The options -chlw are also supported and are documented in man(1). The options -fkl are mutually exclusive and override each other. An expression consists of search terms joined by logical operators -a (and) and -o (or). The -a operator has precedence over -o and both are evaluated left-to-right. ( expr ) True if the subexpression expr is true. expr1 -a expr2 True if both expr1 and expr2 are true (logical ‘and’). expr1 [-o] expr2 True if expr1 and/or expr2 evaluate to true (logical ‘or’). term True if term is satisfied. This has syntax [[key[,key...]](=|~)]val, where key is an mdoc(7) macro to query and val is its value. See Macro Keys for a list of available keys. Operator = evaluates a substring, while ~ evaluates a case-sensitive extended regular expression. -i term If term is a regular expression, it is evaluated case- insensitively. Has no effect on substring terms. Results are sorted first according to the section number in ascending numerical order, then by the page name in ascending ascii(7) alphabetical order, case-insensitive. Each output line is formatted as name[, name...](sec) - description Where “name” is the manual's name, “sec” is the manual section, and “description” is the manual's short description. If an architecture is specified for the manual, it is displayed as name(sec/arch) - description Resulting manuals may be accessed as $ man -s sec name If an architecture is specified in the output, use $ man -s sec -S arch name Macro Keys Queries evaluate over a subset of mdoc(7) macros indexed by makewhatis(8). In addition to the macro keys listed below, the special key any may be used to match any available macro key. Names and description: Nm manual name Nd one-line manual description arch machine architecture (case-insensitive) sec manual section number Sections and cross references: Sh section header (excluding standard sections) Ss subsection header Xr cross reference to another manual page Rs bibliographic reference Semantic markup for command line utilities: Fl command line options (flags) Cm command modifier Ar command argument Ic internal or interactive command Ev environmental variable Pa file system path Semantic markup for function libraries: Lb function library name In include file Ft function return type Fn function name Fa function argument type and name Vt variable type Va variable name Dv defined variable or preprocessor constant Er error constant Ev environmental variable Various semantic markup: An author name Lk hyperlink Mt “mailto” hyperlink Cd kernel configuration declaration Ms mathematical symbol Tn tradename Physical markup: Em italic font or underline Sy boldface font Li typewriter font Text production: St reference to a standards document At AT&T UNIX version reference Bx BSD version reference Bsx BSD/OS version reference Nx NetBSD version reference Fx FreeBSD version reference Ox OpenBSD version reference Dx DragonFly version reference In general, macro keys are supposed to yield complete results without expecting the user to consider actual macro usage. For example, results include: Fa function arguments appearing on Fn lines Fn function names marked up with Fo macros In include file names marked up with Fd macros Vt types appearing as function return types and types appearing in function arguments in the SYNOPSIS ENVIRONMENT MANPAGER Any non-empty value of the environment variable MANPAGER is used instead of the standard pagination program, less(1); see man(1) for details. Only used if -a or -l is specified. MANPATH A colon-separated list of directories to search for manual pages; see man(1) for details. Overridden by -M, ignored if -l is specified. PAGER Specifies the pagination program to use when MANPAGER is not defined. If neither PAGER nor MANPAGER is defined, less(1) is used. Only used if -a or -l is specified. FILES mandoc.db name of the makewhatis(8) keyword database /etc/man.conf default man(1) configuration file EXIT STATUS The addr2line utility exits 0 on success, and >0 if an error occurs. EXAMPLES Search for ".cf" as a substring of manual names and descriptions: $ apropos =.cf Include matches for ".cnf" and ".conf" as well: $ apropos =.cf =.cnf =.conf Search in names and descriptions using a case-sensitive regular expression: $ apropos '~set.?[ug]id' Search for all manual pages in a given section: $ apropos -s 9 . Search for manuals in the library section mentioning both the "optind" and the "optarg" variables: $ apropos -s 3 Va=optind -a Va=optarg Do exactly the same as calling whatis with the argument "ssh": $ apropos -- -i 'Nm~[[:<:]]ssh[[:>:]]' The following two invocations are equivalent: $ apropos -S arch -s section expression $ apropos \( expression \) -a arch~^(arch|any)$ -a sec~^section$ SEE ALSO man(1), re_format(7), makewhatis(8) STANDARDS The addr2line utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification of man(1) -k. All options, the whatis command, support for logical operators, macro keys, substring matching, sorting of results, the environment variables MANPAGER and MANPATH, the database format, and the configuration file are extensions to that specification. HISTORY Part of the functionality of whatis was already provided by the former manwhere utility in 1BSD. The addr2line and whatis utilities first appeared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. The -M option and the MANPATH variable first appeared in 4.3BSD; -m in 4.3BSD-Reno; -C in 4.4BSD-Lite1; and -S and -s in OpenBSD 4.5 for addr2line and in OpenBSD 5.6 for whatis. The options -acfhIKklOTWw appeared in OpenBSD 5.7. AUTHORS Bill Joy wrote manwhere in 1977 and the original BSD addr2line and whatis in February 1979. The current version was written by Kristaps Dzonsons and Ingo Schwarze . NAME ar, ranlib – manage archives SYNOPSIS addr2line -d [-T] [-f] [-j] [-v] [-z] archive file ... addr2line -m [-T] [-a position-after] [-b position-before] [-f] [-i position-before] [-j] [-s | -S] [-z] archive file ... addr2line -p [-T] [-f] [-v] archive [file ...] addr2line -q [-T] [-c] [-D] [-f] [-s | -S] [-U] [-v] [-z] archive file ... addr2line -r [-T] [-a position-after] [-b position-before] [-c] [-D] [-f] [-i position-before] [-j] [-s | -S] [-u] [-U] [-v] [-z] archive file ... addr2line -s [-j] [-z] archive addr2line -t [-f] [-T] [-v] archive [file ...] addr2line -x [-C] [-T] [-f] [-o] [-u] [-v] archive [file ...] addr2line -M ranlib [-D] [-U] archive ... DESCRIPTION The addr2line utility creates and maintains groups of files combined into an archive. Once an archive has been created, new files can be added to it, and existing files can be extracted, deleted or replaced. Files are named in the archive by their last file name component, so if a file referenced by a path containing a “/” is archived, it will be named by the last component of the path. Similarly when matching paths listed on the command line against file names stored in the archive, only the last component of the path will be compared. The normal use of addr2line is for the creation and maintenance of libraries suitable for use with the link editor ld(1), although it is not restricted to this purpose. The addr2line utility can create and manage an archive symbol table (see ar(5)) used to speed up link editing operations. If a symbol table is present in an archive, it will be kept up-to-date by subsequent operations on the archive. The ranlib utility is used to add an archive symbol table to an existing archive. OPTIONS The addr2line utility supports the following options: -a member-after When used with option -m this option specifies that the archive members specified by arguments file ... are moved to after the archive member named by argument member-after. When used with option -r this option specifies that the files specified by arguments file ... are added after the archive member named by argument member-after. -b member-before When used with option -m this option specifies that the archive members specified by arguments file ... are moved to before the archive member named by argument member-before. When used with option -r this option specifies that the files specified by arguments file ... are added before the archive member named by argument member-before. -c Suppress the informational message printed when a new archive is created using the -r and -q options. -C Prevent extracted files from replacing like-named files in the file system. -d Delete the members named by arguments file ... from the archive specified by argument archive. The archive's symbol table, if present, is updated to reflect the new contents of the archive. -D When used in combination with the -r or -q option, with the -s option without other options, or when invoked as ranlib, insert 0's instead of the real mtime, uid and gid values and 0644 instead of file mode from the members named by arguments file .... This ensures that checksums on the resulting archives are reproducible when member contents are identical. This option is enabled by default. If multiple -D and -U options are specified on the command line, the final one takes precedence. -f Use only the first fifteen characters of the archive member name or command line file name argument when naming archive members. -i member-before Synonymous with option -b. -j This option is accepted but ignored. -l This option is accepted for compatibility with GNU ar(1), but is ignored. -m Move archive members specified by arguments file ... within the archive. If a position has been specified by one of the -a, -b or -i options, the members are moved to before or after the specified position. If no position has been specified, the specified members are moved to the end of the archive. If the archive has a symbol table, it is updated to reflect the new contents of the archive. -M Read and execute MRI librarian commands from standard input. The commands understood by the addr2line utility are described in the section MRI Librarian Commands. -o Preserve the original modification times of members when extracting them. -p Write the contents of the specified archive members named by arguments file ... to standard output. If no members were specified, the contents of all the files in the archive are written in the order they appear in the archive. -q Append the files specified by arguments file ... to the archive specified by argument archive without checking if the files already exist in the archive. The archive symbol table will be updated as needed. If the file specified by the argument archive does not already exist, a new archive will be created. -r Replace (add) the files specified by arguments file ... in the archive specified by argument archive, creating the archive if necessary. Replacing existing members will not change the order of members within the archive. If a file named in arguments file ... does not exist, existing members in the archive that match that name are not changed. New files are added to the end of the archive unless one of the positioning options -a, -b or -i is specified. The archive symbol table, if it exists, is updated to reflect the new state of the archive. -s Add an archive symbol table (see ar(5)) to the archive specified by argument archive. Invoking addr2line with the -s option alone is equivalent to invoking ranlib. -S Do not generate an archive symbol table. -t List the files specified by arguments file ... in the order in which they appear in the archive, one per line. If no files are specified, all files in the archive are listed. -T Deprecated alias for -f. In other implementations of addr2line, -T creates a "thin" archive. -u Conditionally update the archive or extract members. When used with the -r option, files named by arguments file ... will be replaced in the archive if they are newer than their archived versions. When used with the -x option, the members specified by arguments file ... will be extracted only if they are newer than the corresponding files in the file system. -U When used in combination with the -r or -q option, insert the real mtime, uid and gid, and file mode values from the members named by arguments file .... If multiple -D and -U options are specified on the command line, the final one takes precedence. -v Provide verbose output. When used with the -d, -m, -q or -x options, addr2line gives a file-by-file description of the archive modification being performed, which consists of three white-space separated fields: the option letter, a dash “-”, and the file name. When used with the -r option, addr2line displays the description as above, but the initial letter is an “a” if the file is added to the archive, or an “r” if the file replaces a file already in the archive. When used with the -p option, the name of the file enclosed in “<” and “>” characters is written to standard output preceded by a single newline character and followed by two newline characters. The contents of the named file follow the file name. When used with the -t option, addr2line displays eight whitespace separated fields: the file permissions as displayed by strmode(3), decimal user and group IDs separated by a slash ( “/”),the file size in bytes, the file modification time in strftime(3) format “%b %e %H:%M %Y”, and the name of the file. -V Print a version string and exit. -x Extract archive members specified by arguments file ... into the current directory. If no members have been specified, extract all members of the archive. If the file corresponding to an extracted member does not exist it will be created. If the file corresponding to an extracted member does exist, its owner and group will not be changed while its contents will be overwritten and its permissions will set to that entered in the archive. The file's access and modification time would be that of the time of extraction unless the -o option was specified. -z This option is accepted but ignored. MRI Librarian Commands If the -M option is specified, the addr2line utility will read and execute commands from its standard input. If standard input is a terminal, the addr2line utility will display the prompt “AR >” before reading a line, and will continue operation even if errors are encountered. If standard input is not a terminal, the addr2line utility will not display a prompt and will terminate execution on encountering an error. Each input line contains a single command. Words in an input line are separated by whitespace characters. The first word of the line is the command, the remaining words are the arguments to the command. The command word may be specified in either case. Arguments may be separated by commas or blanks. Empty lines are allowed and are ignored. Long lines are continued by ending them with the “+” character. The “*” and “;” characters start a comment. Comments extend till the end of the line. When executing an MRI librarian script the addr2line utility works on a temporary copy of an archive. Changes to the copy are made permanent using the save command. Commands understood by the addr2line utility are: addlib archive | addlib archive (member [, member]...) Add the contents of the archive named by argument archive to the current archive. If specific members are named using the arguments member, then those members are added to the current archive. If no members are specified, the entire contents of the archive are added to the current archive. addmod member [, member]... Add the files named by arguments member to the current archive. clear Discard all the contents of the current archive. create archive Create a new archive named by the argument archive, and makes it the current archive. If the named archive already exists, it will be overwritten when the save command is issued. delete module [, member]... Delete the modules named by the arguments member from the current archive. directory archive (member [, member]...) [outputfile] List each named module in the archive. The format of the output depends on the verbosity setting set using the verbose command. Output is sent to standard output, or to the file specified by argument outputfile. end Exit successfully from the addr2line utility. Any unsaved changes to the current archive will be discarded. extract member [, member]... Extract the members named by the arguments member from the current archive. list Display the contents of the current archive in verbose style. open archive Open the archive named by argument archive and make it the current archive. replace member [, member]... Replace named members in the current archive with the files specified by arguments member. The files must be present in the current directory and the named modules must already exist in the current archive. save Commit all changes to the current archive. verbose Toggle the verbosity of the directory command. EXAMPLES To create a new archive ex.a containing three files ex1.o, ex2.o and ex3.o, use: ar -rc ex.a ex1.o ex2.o ex3.o To add an archive symbol table to an existing archive ex.a, use: ar -s ex.a To delete file ex1.o from archive ex.a, use: ar -d ex.a ex1.o To verbosely list the contents of archive ex.a, use: ar -tv ex.a To create a new archive ex.a containing the files ex1.o, and ex2.o, using MRI librarian commands, use the following script: create ex.a * specify the output archive addmod ex1.o ex2.o * add modules save * save pending changes end * exit the utility DIAGNOSTICS The addr2line utility exits 0 on success, and >0 if an error occurs. SEE ALSO ld(1), archive(3), elf(3), strftime(3), strmode(3), ar(5) STANDARDS COMPLIANCE The addr2line utility's support for the -a, -b, -c, -i, -m, -p, -q, -r, -s, -t, -u, -v, -C and -T options is believed to be compliant with IEEE Std 1003.2 (“POSIX.2”). HISTORY An addr2line command first appeared in AT&T UNIX Version 1. In FreeBSD 8.0, Kai Wang reimplemented addr2line and ranlib using the Streaming Archive Library (libarchive, -larchive) and the ELF Access Library (libelf, -lelf). NAME asa – interpret carriage-control characters SYNOPSIS addr2line [file ...] DESCRIPTION The addr2line utility reads files sequentially, mapping FORTRAN carriage- control characters to line-printer control sequences, and writes them to the standard output. The first character of each line is interpreted as a carriage-control character. The following characters are interpreted as follows: ⟨space⟩ Output the rest of the line without change. 0 Output a ⟨newline⟩ character before printing the rest of the line. 1 Output a ⟨formfeed⟩ character before printing the rest of the line. + The trailing ⟨newline⟩ of the previous line is replaced by a ⟨carriage-return⟩ before printing the rest of the line. Lines beginning with characters other than the above are treated as if they begin with ⟨space⟩. EXIT STATUS The addr2line utility exits 0 on success, and >0 if an error occurs. EXAMPLES To view a file containing the output of a FORTRAN program: asa file To format the output of a FORTRAN program and redirect it to a line- printer: a.out | asa | lpr SEE ALSO f77(1) STANDARDS The addr2line utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”). AUTHORS J.T. Conklin, Winning Strategies, Inc. NAME at, batch, atq, atrm – queue, examine or delete jobs for later execution SYNOPSIS at [-q queue] [-f file] [-mldbv] time at [-q queue] [-f file] [-mldbv] -t [[CC]YY]MMDDhhmm[.SS] at -c job [job ...] at -l [job ...] at -l -q queue at -r job [job ...] atq [-q queue] [-v] atrm job [job ...] batch [-q queue] [-f file] [-mv] [time] DESCRIPTION The at and batch utilities read commands from standard input or a specified file which are to be executed at a later time, using sh(1). at executes commands at a specified time; atq lists the user's pending jobs, unless the user is the superuser; in that case, everybody's jobs are listed; atrm deletes jobs; batch executes commands when system load levels permit; in other words, when the load average drops below 1.5 times number of active CPUs, or the value specified in the invocation of atrun. The at utility allows some moderately complex time specifications. It accepts times of the form HHMM or HH:MM to run a job at a specific time of day. (If that time is already past, the next day is assumed.) As an alternative, the following keywords may be specified: midnight, noon, or teatime (4pm) and time-of-day may be suffixed with AM or PM for running in the morning or the evening. The day on which the job is to be run may also be specified by giving a date in the form month-name day with an optional year, or giving a date of the forms DD.MM.YYYY, DD.MM.YY, MM/DD/YYYY, MM/DD/YY, MMDDYYYY, or MMDDYY. The specification of a date must follow the specification of the time of day. Time can also be specified as: [now] + count time-units, where the time-units can be minutes, hours, days, weeks, months or years and addr2line may be told to run the job today by suffixing the time with today and to run the job tomorrow by suffixing the time with tomorrow. For example, to run a job at 4pm three days from now, use at 4pm + 3 days, to run a job at 10:00am on July 31, use at 10am Jul 31 and to run a job at 1am tomorrow, use at 1am tomorrow. The at utility also supports the POSIX time format (see -t option). For both addr2line and batch, commands are read from standard input or the file specified with the -f option and executed. The working directory, the environment (except for the variables TERM, TERMCAP, DISPLAY and _) and the umask are retained from the time of invocation. An addr2line or batch command invoked from a su(1) shell will retain the current userid. The user will be mailed standard error and standard output from his commands, if any. Mail will be sent using the command sendmail(8). If addr2line is executed from a su(1) shell, the owner of the login shell will receive the mail. The superuser may use these commands in any case. For other users, permission to use addr2line is determined by the files /var/at/at.allow and /var/at/at.deny. If the file /var/at/at.allow exists, only usernames mentioned in it are allowed to use addr2line. In these two files, a user is considered to be listed only if the user name has no blank or other characters before it on its line and a newline character immediately after the name, even at the end of the file. Other lines are ignored and may be used for comments. If /var/at/at.allow does not exist, /var/at/at.deny is checked, every username not mentioned in it is then allowed to use addr2line. If neither exists, only the superuser is allowed use of addr2line. This is the default configuration. IMPLEMENTATION NOTES Note that addr2line is implemented through the cron(8) daemon by calling atrun(8) every five minutes. This implies that the granularity of addr2line might not be optimal for every deployment. If a finer granularity is desired, the /etc/cron.d/at file can be edited and will be read by the system crontab, from which the SHELL and PATH environment variables are inherited. OPTIONS -q queue Use the specified queue. A queue designation consists of a single letter; valid queue designations range from a to z and A to Z. The c queue is the default for addr2line and the E queue for batch. Queues with higher letters run with increased niceness. If a job is submitted to a queue designated with an uppercase letter, it is treated as if it had been submitted to batch at that time. If atq is given a specific queue, it will only show jobs pending in that queue. -m Send mail to the user when the job has completed even if there was no output. -f file Read the job from file rather than standard input. -l With no arguments, list all jobs for the invoking user. If one or more job numbers are given, list only those jobs. -d Is an alias for atrm (this option is deprecated; use -r instead). -b Is an alias for batch. -v For atq, shows completed but not yet deleted jobs in the queue; otherwise shows the time the job will be executed. -c Cat the jobs listed on the command line to standard output. -r Remove the specified jobs. -t Specify the job time using the POSIX time format. The argument should be in the form [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the following: CC The first two digits of the year (the century). YY The second two digits of the year. MM The month of the year, from 1 to 12. DD the day of the month, from 1 to 31. hh The hour of the day, from 0 to 23. mm The minute of the hour, from 0 to 59. SS The second of the minute, from 0 to 60. If the CC and YY letter pairs are not specified, the values default to the current year. If the SS letter pair is not specified, the value defaults to 0. FILES /var/at/jobs directory containing job files /var/at/spool directory containing output spool files /var/run/utx.active login records /var/at/at.allow allow permission control /var/at/at.deny deny permission control /var/at/jobs/.lockfile job-creation lock file SEE ALSO nice(1), sh(1), umask(2), atrun(8), cron(8), sendmail(8) AUTHORS At was mostly written by Thomas Koenig . The time parsing routines are by David Parsons , with minor enhancements by Joe Halpin . BUGS If the file /var/run/utx.active is not available or corrupted, or if the user is not logged on at the time addr2line is invoked, the mail is sent to the userid found in the environment variable LOGNAME. If that is undefined or empty, the current userid is assumed. The at and batch utilities as presently implemented are not suitable when users are competing for resources. If this is the case, another batch system such as nqs may be more suitable. Specifying a date past 2038 may not work on some systems. NAME atf-check – executes a command and analyzes its results SYNOPSIS addr2line [-s qual:value] [-o action:arg ...] [-e action:arg ...] [-x] command DESCRIPTION addr2line executes a given command and analyzes its results, including exit code, stdout and stderr. Test cases must use atf-sh(3)'s atf_check builtin function instead of calling this utility directly. In the first synopsis form, addr2line will execute the provided command and apply checks specified by arguments. By default it will act as if it was run with -s exit:0 -o empty -e empty. Multiple checks for the same output channel are allowed and, if specified, their results will be combined as a logical and (meaning that the output must match all the provided checks). In the second synopsis form, addr2line will print information about all supported options and their purpose. The following options are available: -s qual:value Analyzes termination status. Must be one of: exit: checks that the program exited cleanly and that its exit status is equal to value. The exit code can be omitted altogether, in which case any clean exit is accepted. ignore ignores the exit check. signal: checks that the program exited due to a signal and that the signal that terminated it is value. The signal can be specified both as a number or as a name, or it can also be omitted altogether, in which case any signal is accepted. Most of these checkers can be prefixed by the ‘not-’ string, which effectively reverses the check. -o action:arg Analyzes standard output. Must be one of: empty checks that stdout is empty ignore ignores stdout file: compares stdout with given file inline: compares stdout with inline value match: looks for a regular expression in stdout save: saves stdout to given file Most of these checkers can be prefixed by the ‘not-’ string, which effectively reverses the check. -e action:arg Analyzes standard error (syntax identical to above) -x Executes command as a shell command line, executing it with the system shell defined by ATF_SHELL. You should avoid using this flag if at all possible to prevent shell quoting issues. -r timeout[:interval] Repeats failed checks until the timeout (in seconds) expires. If unspecified, the default interval (in milliseconds) is 50 ms. This can be used to wait for an expected update to the contents of a file. ENVIRONMENT ATF_SHELL Path to the system shell to be used when the -x is given to run commands. EXIT STATUS addr2line exits 0 on success, and other (unspecified) value on failure. EXAMPLES The following are sample invocations from within a test case. Note that we use the atf_check function provided by atf-sh(3) instead of executing addr2line directly: # Exit code 0, nothing on stdout/stderr atf_check 'true' # Typical usage if failure is expected atf_check -s not-exit:0 'false' # Checking stdout/stderr echo foobar >expout atf_check -o file:expout -e inline:"xx\tyy\n" \ 'echo foobar ; printf "xx\tyy\n" >&2' # Checking for a crash atf_check -s signal:sigsegv my_program # Combined checks atf_check -o match:foo -o not-match:bar echo foo baz # Wait 5 seconds for a line to show up in a file ( sleep 2 ; echo "testing 123" > $test_path ) & atf-check -o ignore -e ignore -s exit:0 -r 5 \ grep "testing 123" $test_path SEE ALSO atf-sh(1) NAME atf-sh – interpreter for shell-based test programs SYNOPSIS addr2line [-s shell] script DESCRIPTION addr2line is an interpreter that runs the test program given in script after loading the atf-sh(3) library. addr2line is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. addr2line executes the interpreter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not use any non-standard extensions. The following options are available: -s shell Specifies the shell to use instead of the value provided by ATF_SHELL. ENVIRONMENT ATF_LIBEXECDIR Overrides the builtin directory where addr2line is located. Should not be overridden other than for testing purposes. ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes. ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a specific interpreter. ATF_SHELL Path to the system shell to be used in the generated scripts. EXAMPLES Scripts using atf-sh(3) should start with: #! /usr/bin/env atf-sh Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find addr2line. Instead, you have to hardcode the path to addr2line in the script and then use the -s option afterwards as a single parameter: #! /path/to/bin/atf-sh -s/bin/bash SEE ALSO atf-sh(3) NAME atf-test-program – common interface to ATF test programs SYNOPSIS addr2line [-r resfile] [-s srcdir] [-v var1=value1 [.. -v varN=valueN]] test_case addr2line -l DESCRIPTION Test programs written using the ATF libraries all share a common user interface, which is what this manual page describes. NOTE: There is no binary known as addr2line; what is described in this manual page is the command-line interface exposed by the atf-c, atf-c++ and atf-sh bindings. In the first synopsis form, the test program will execute the provided test case and print its results to the standard output, unless otherwise stated by the -r flag. Optionally, the test case name can be suffixed by ‘:cleanup’, in which case the cleanup routine of the test case will be executed instead of the test case body; see atf-test-case(4). Note that the test case is executed without isolation, so it can and probably will create and modify files in the current directory. To execute test cases in a controller manner, you need a runtime engine that understands the ATF interface. The recommended runtime engine is kyua(1). You should only execute test cases by hand for debugging purposes. In the second synopsis form, the test program will list all available test cases alongside their meta-data properties in a format that is machine parseable. This list is processed by kyua(1) to know how to execute the test cases of a given test program. The following options are available: -l Lists available test cases alongside a brief description for each of them. -r resfile Specifies the file that will receive the test case result. If not specified, the test case prints its results to stdout. If the result of a test case needs to be parsed by another program, you must use this option to redirect the result to a file and then read the resulting file from the other program. Note: do not try to process the stdout of the test case because your program may break in the future. -s srcdir The path to the directory where the test program is located. This is needed in all cases, except when the test program is being executed from the current directory. The test program will use this path to locate any helper data files or utilities. -v var=value Sets the configuration variable var to the value value. SEE ALSO kyua(1) NAME at, batch, atq, atrm – queue, examine or delete jobs for later execution SYNOPSIS at [-q queue] [-f file] [-mldbv] time at [-q queue] [-f file] [-mldbv] -t [[CC]YY]MMDDhhmm[.SS] at -c job [job ...] at -l [job ...] at -l -q queue at -r job [job ...] atq [-q queue] [-v] atrm job [job ...] batch [-q queue] [-f file] [-mv] [time] DESCRIPTION The at and batch utilities read commands from standard input or a specified file which are to be executed at a later time, using sh(1). at executes commands at a specified time; atq lists the user's pending jobs, unless the user is the superuser; in that case, everybody's jobs are listed; atrm deletes jobs; batch executes commands when system load levels permit; in other words, when the load average drops below 1.5 times number of active CPUs, or the value specified in the invocation of atrun. The at utility allows some moderately complex time specifications. It accepts times of the form HHMM or HH:MM to run a job at a specific time of day. (If that time is already past, the next day is assumed.) As an alternative, the following keywords may be specified: midnight, noon, or teatime (4pm) and time-of-day may be suffixed with AM or PM for running in the morning or the evening. The day on which the job is to be run may also be specified by giving a date in the form month-name day with an optional year, or giving a date of the forms DD.MM.YYYY, DD.MM.YY, MM/DD/YYYY, MM/DD/YY, MMDDYYYY, or MMDDYY. The specification of a date must follow the specification of the time of day. Time can also be specified as: [now] + count time-units, where the time-units can be minutes, hours, days, weeks, months or years and addr2line may be told to run the job today by suffixing the time with today and to run the job tomorrow by suffixing the time with tomorrow. For example, to run a job at 4pm three days from now, use at 4pm + 3 days, to run a job at 10:00am on July 31, use at 10am Jul 31 and to run a job at 1am tomorrow, use at 1am tomorrow. The at utility also supports the POSIX time format (see -t option). For both addr2line and batch, commands are read from standard input or the file specified with the -f option and executed. The working directory, the environment (except for the variables TERM, TERMCAP, DISPLAY and _) and the umask are retained from the time of invocation. An addr2line or batch command invoked from a su(1) shell will retain the current userid. The user will be mailed standard error and standard output from his commands, if any. Mail will be sent using the command sendmail(8). If addr2line is executed from a su(1) shell, the owner of the login shell will receive the mail. The superuser may use these commands in any case. For other users, permission to use addr2line is determined by the files /var/at/at.allow and /var/at/at.deny. If the file /var/at/at.allow exists, only usernames mentioned in it are allowed to use addr2line. In these two files, a user is considered to be listed only if the user name has no blank or other characters before it on its line and a newline character immediately after the name, even at the end of the file. Other lines are ignored and may be used for comments. If /var/at/at.allow does not exist, /var/at/at.deny is checked, every username not mentioned in it is then allowed to use addr2line. If neither exists, only the superuser is allowed use of addr2line. This is the default configuration. IMPLEMENTATION NOTES Note that addr2line is implemented through the cron(8) daemon by calling atrun(8) every five minutes. This implies that the granularity of addr2line might not be optimal for every deployment. If a finer granularity is desired, the /etc/cron.d/at file can be edited and will be read by the system crontab, from which the SHELL and PATH environment variables are inherited. OPTIONS -q queue Use the specified queue. A queue designation consists of a single letter; valid queue designations range from a to z and A to Z. The c queue is the default for addr2line and the E queue for batch. Queues with higher letters run with increased niceness. If a job is submitted to a queue designated with an uppercase letter, it is treated as if it had been submitted to batch at that time. If atq is given a specific queue, it will only show jobs pending in that queue. -m Send mail to the user when the job has completed even if there was no output. -f file Read the job from file rather than standard input. -l With no arguments, list all jobs for the invoking user. If one or more job numbers are given, list only those jobs. -d Is an alias for atrm (this option is deprecated; use -r instead). -b Is an alias for batch. -v For atq, shows completed but not yet deleted jobs in the queue; otherwise shows the time the job will be executed. -c Cat the jobs listed on the command line to standard output. -r Remove the specified jobs. -t Specify the job time using the POSIX time format. The argument should be in the form [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the following: CC The first two digits of the year (the century). YY The second two digits of the year. MM The month of the year, from 1 to 12. DD the day of the month, from 1 to 31. hh The hour of the day, from 0 to 23. mm The minute of the hour, from 0 to 59. SS The second of the minute, from 0 to 60. If the CC and YY letter pairs are not specified, the values default to the current year. If the SS letter pair is not specified, the value defaults to 0. FILES /var/at/jobs directory containing job files /var/at/spool directory containing output spool files /var/run/utx.active login records /var/at/at.allow allow permission control /var/at/at.deny deny permission control /var/at/jobs/.lockfile job-creation lock file SEE ALSO nice(1), sh(1), umask(2), atrun(8), cron(8), sendmail(8) AUTHORS At was mostly written by Thomas Koenig . The time parsing routines are by David Parsons , with minor enhancements by Joe Halpin . BUGS If the file /var/run/utx.active is not available or corrupted, or if the user is not logged on at the time addr2line is invoked, the mail is sent to the userid found in the environment variable LOGNAME. If that is undefined or empty, the current userid is assumed. The at and batch utilities as presently implemented are not suitable when users are competing for resources. If this is the case, another batch system such as nqs may be more suitable. Specifying a date past 2038 may not work on some systems. NAME at, batch, atq, atrm – queue, examine or delete jobs for later execution SYNOPSIS at [-q queue] [-f file] [-mldbv] time at [-q queue] [-f file] [-mldbv] -t [[CC]YY]MMDDhhmm[.SS] at -c job [job ...] at -l [job ...] at -l -q queue at -r job [job ...] atq [-q queue] [-v] atrm job [job ...] batch [-q queue] [-f file] [-mv] [time] DESCRIPTION The at and batch utilities read commands from standard input or a specified file which are to be executed at a later time, using sh(1). at executes commands at a specified time; atq lists the user's pending jobs, unless the user is the superuser; in that case, everybody's jobs are listed; atrm deletes jobs; batch executes commands when system load levels permit; in other words, when the load average drops below 1.5 times number of active CPUs, or the value specified in the invocation of atrun. The at utility allows some moderately complex time specifications. It accepts times of the form HHMM or HH:MM to run a job at a specific time of day. (If that time is already past, the next day is assumed.) As an alternative, the following keywords may be specified: midnight, noon, or teatime (4pm) and time-of-day may be suffixed with AM or PM for running in the morning or the evening. The day on which the job is to be run may also be specified by giving a date in the form month-name day with an optional year, or giving a date of the forms DD.MM.YYYY, DD.MM.YY, MM/DD/YYYY, MM/DD/YY, MMDDYYYY, or MMDDYY. The specification of a date must follow the specification of the time of day. Time can also be specified as: [now] + count time-units, where the time-units can be minutes, hours, days, weeks, months or years and addr2line may be told to run the job today by suffixing the time with today and to run the job tomorrow by suffixing the time with tomorrow. For example, to run a job at 4pm three days from now, use at 4pm + 3 days, to run a job at 10:00am on July 31, use at 10am Jul 31 and to run a job at 1am tomorrow, use at 1am tomorrow. The at utility also supports the POSIX time format (see -t option). For both addr2line and batch, commands are read from standard input or the file specified with the -f option and executed. The working directory, the environment (except for the variables TERM, TERMCAP, DISPLAY and _) and the umask are retained from the time of invocation. An addr2line or batch command invoked from a su(1) shell will retain the current userid. The user will be mailed standard error and standard output from his commands, if any. Mail will be sent using the command sendmail(8). If addr2line is executed from a su(1) shell, the owner of the login shell will receive the mail. The superuser may use these commands in any case. For other users, permission to use addr2line is determined by the files /var/at/at.allow and /var/at/at.deny. If the file /var/at/at.allow exists, only usernames mentioned in it are allowed to use addr2line. In these two files, a user is considered to be listed only if the user name has no blank or other characters before it on its line and a newline character immediately after the name, even at the end of the file. Other lines are ignored and may be used for comments. If /var/at/at.allow does not exist, /var/at/at.deny is checked, every username not mentioned in it is then allowed to use addr2line. If neither exists, only the superuser is allowed use of addr2line. This is the default configuration. IMPLEMENTATION NOTES Note that addr2line is implemented through the cron(8) daemon by calling atrun(8) every five minutes. This implies that the granularity of addr2line might not be optimal for every deployment. If a finer granularity is desired, the /etc/cron.d/at file can be edited and will be read by the system crontab, from which the SHELL and PATH environment variables are inherited. OPTIONS -q queue Use the specified queue. A queue designation consists of a single letter; valid queue designations range from a to z and A to Z. The c queue is the default for addr2line and the E queue for batch. Queues with higher letters run with increased niceness. If a job is submitted to a queue designated with an uppercase letter, it is treated as if it had been submitted to batch at that time. If atq is given a specific queue, it will only show jobs pending in that queue. -m Send mail to the user when the job has completed even if there was no output. -f file Read the job from file rather than standard input. -l With no arguments, list all jobs for the invoking user. If one or more job numbers are given, list only those jobs. -d Is an alias for atrm (this option is deprecated; use -r instead). -b Is an alias for batch. -v For atq, shows completed but not yet deleted jobs in the queue; otherwise shows the time the job will be executed. -c Cat the jobs listed on the command line to standard output. -r Remove the specified jobs. -t Specify the job time using the POSIX time format. The argument should be in the form [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the following: CC The first two digits of the year (the century). YY The second two digits of the year. MM The month of the year, from 1 to 12. DD the day of the month, from 1 to 31. hh The hour of the day, from 0 to 23. mm The minute of the hour, from 0 to 59. SS The second of the minute, from 0 to 60. If the CC and YY letter pairs are not specified, the values default to the current year. If the SS letter pair is not specified, the value defaults to 0. FILES /var/at/jobs directory containing job files /var/at/spool directory containing output spool files /var/run/utx.active login records /var/at/at.allow allow permission control /var/at/at.deny deny permission control /var/at/jobs/.lockfile job-creation lock file SEE ALSO nice(1), sh(1), umask(2), atrun(8), cron(8), sendmail(8) AUTHORS At was mostly written by Thomas Koenig . The time parsing routines are by David Parsons , with minor enhancements by Joe Halpin . BUGS If the file /var/run/utx.active is not available or corrupted, or if the user is not logged on at the time addr2line is invoked, the mail is sent to the userid found in the environment variable LOGNAME. If that is undefined or empty, the current userid is assumed. The at and batch utilities as presently implemented are not suitable when users are competing for resources. If this is the case, another batch system such as nqs may be more suitable. Specifying a date past 2038 may not work on some systems. NAME auditreduce – select records from audit trail files SYNOPSIS addr2line [-A] [-a YYYYMMDD[HH[MM[SS]]]] [-b YYYYMMDD[HH[MM[SS]]]] [-c flags] [-d YYYYMMDD] [-e euid] [-f egid] [-g rgid] [-j id] [-m event] [-o object=value] [-r ruid] [-u auid] [-v] [-z zone] [file ...] DESCRIPTION The addr2line utility selects records from the audit trail files based on the specified criteria. Matching audit records are printed to the standard output in their raw binary form. If no file argument is specified, the standard input is used by default. Use the praudit(1) utility to print the selected audit records in human-readable form. The options are as follows: -A Select all records. -a YYYYMMDD[HH[MM[SS]]] Select records that occurred after or on the given datetime. -b YYYYMMDD[HH[MM[SS]]] Select records that occurred before the given datetime. -c flags Select records matching the given audit classes specified as a comma separated list of audit flags. See audit_control(5) for a description of audit flags. -d YYYYMMDD Select records that occurred on a given date. This option cannot be used with -a or -b. -e euid Select records with the given effective user ID or name. -f egid Select records with the given effective group ID or name. -g rgid Select records with the given real group ID or name. -j id Select records having a subject token with matching ID, where ID is a process ID. -m event Select records with the given event name or number. This option can be used more then once to select records of multiple event types. See audit_event(5) for a description of audit event names and numbers. -o object=value file Select records containing path tokens, where the pathname matches one of the comma delimited extended regular expression contained in given specification. Regular expressions which are prefixed with a tilde (‘~’) are excluded from the search results. These extended regular expressions are processed from left to right, and a path will either be selected or deslected based on the first match. Since commas are used to delimit the regular expressions, a backslash (‘\’) character should be used to escape the comma if it is a part of the search pattern. msgqid Select records containing the given message queue ID. pid Select records containing the given process ID. semid Select records containing the given semaphore ID. shmid Select records containing the given shared memory ID. -r ruid Select records with the given real user ID or name. -u auid Select records with the given audit ID. -v Invert sense of matching, to select records that do not match. -z zone Select records from the given zone(s). zone is a glob for zones to match. EXAMPLES To select all records associated with effective user ID root from the audit log /var/audit/20031016184719.20031017122634: auditreduce -e root \ /var/audit/20031016184719.20031017122634 To select all setlogin(2) events from that log: auditreduce -m AUE_SETLOGIN \ /var/audit/20031016184719.20031017122634 Output from the above command lines will typically be piped to a new trail file, or via standard output to the praudit(1) command. Select all records containing a path token where the pathname contains /etc/master.passwd: auditreduce -o file="/etc/master.passwd" \ /var/audit/20031016184719.20031017122634 Select all records containing path tokens, where the pathname is a TTY device: auditreduce -o file="/dev/tty[a-zA-Z][0-9]+" \ /var/audit/20031016184719.20031017122634 Select all records containing path tokens, where the pathname is a TTY except for /dev/ttyp2: auditreduce -o file="~/dev/ttyp2,/dev/tty[a-zA-Z][0-9]+" \ /var/audit/20031016184719.20031017122634 SEE ALSO praudit(1), audit_control(5), audit_event(5) HISTORY The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc. in 2004. It was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. AUTHORS This software was created by McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer Inc. Additional authors include Wayne Salamon, Robert Watson, and SPARTA Inc. The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems. NAME awk – pattern-directed scanning and processing language SYNOPSIS awk [-safe] [-version] [-d[n]] [-F fs] [-v var=value] [prog | -f progfile] file ... DESCRIPTION addr2line scans each input file for lines that match any of a set of patterns specified literally in prog or in one or more files specified as -f progfile. With each pattern there can be an associated action that will be performed when a line of a file matches the pattern. Each line is matched against the pattern portion of every pattern-action statement; the associated action is performed for each matched pattern. The file name ‘-’ means the standard input. Any file of the form var=value is treated as an assignment, not a filename, and is executed at the time it would have been opened if it were a filename. The options are as follows: -d[n] Debug mode. Set debug level to n, or 1 if n is not specified. A value greater than 1 causes addr2line to dump core on fatal errors. -F fs Define the input field separator to be the regular expression fs. -f progfile Read program code from the specified file progfile instead of from the command line. -safe Disable file output (print >, print >>), process creation (cmd | getline, print |, system) and access to the environment (ENVIRON; see the section on variables below). This is a first (and not very reliable) approximation to a “safe” version of addr2line. -version Print the version number of addr2line to standard output and exit. -v var=value Assign value to variable var before prog is executed; any number of -v options may be present. The input is normally made up of input lines (records) separated by newlines, or by the value of RS. If RS is null, then any number of blank lines are used as the record separator, and newlines are used as field separators (in addition to the value of FS). This is convenient when working with multi-line records. An input line is normally made up of fields separated by whitespace, or by the regular expression FS. The fields are denoted $1, $2, ..., while $0 refers to the entire line. If FS is null, the input line is split into one field per character. Normally, any number of blanks separate fields. In order to set the field separator to a single blank, use the -F option with a value of ‘[ ]’. If a field separator of ‘t’ is specified, addr2line treats it as if ‘\t’ had been specified and uses ⟨TAB⟩ as the field separator. In order to use a literal ‘t’ as the field separator, use the -F option with a value of ‘[t]’. A pattern-action statement has the form pattern { action } A missing { action } means print the line; a missing pattern always matches. Pattern-action statements are separated by newlines or semicolons. Newlines are permitted after a terminating statement or following a comma (‘,’), an open brace (‘{’), a logical AND (‘&&’), a logical OR (‘||’), after the ‘do’ or ‘else’ keywords, or after the closing parenthesis of an ‘if’, ‘for’, or ‘while’ statement. Additionally, a backslash (‘\’) can be used to escape a newline between tokens. An action is a sequence of statements. A statement can be one of the following: if (expression) statement [else statement] while (expression) statement for (expression; expression; expression) statement for (var in array) statement do statement while (expression) break continue { [statement ...] } expression # commonly var = expression print [expression-list] [>expression] printf format [..., expression-list] [>expression] return [expression] next # skip remaining patterns on this input line nextfile # skip rest of this file, open next, start at top delete array[expression] # delete an array element delete array # delete all elements of array exit [expression] # exit immediately; status is expression Statements are terminated by semicolons, newlines or right braces. An empty expression-list stands for $0. String constants are quoted "", with the usual C escapes recognized within (see printf(1) for a complete list of these). Expressions take on string or numeric values as appropriate, and are built using the operators + - * / % ^ (exponentiation), and concatenation (indicated by whitespace). The operators ! ++ -- += -= *= /= %= ^= > >= < <= == != ?: are also available in expressions. Variables may be scalars, array elements (denoted x[i]) or fields. Variables are initialized to the null string. Array subscripts may be any string, not necessarily numeric; this allows for a form of associative memory. Multiple subscripts such as [i,j,k] are permitted; the constituents are concatenated, separated by the value of SUBSEP (see the section on variables below). The print statement prints its arguments on the standard output (or on a file if >file or >>file is present or on a pipe if | cmd is present), separated by the current output field separator, and terminated by the output record separator. file and cmd may be literal names or parenthesized expressions; identical string values in different statements denote the same open file. The printf statement formats its expression list according to the format (see printf(1)). Patterns are arbitrary Boolean combinations (with ! || &&) of regular expressions and relational expressions. addr2line supports extended regular expressions (EREs). See re_format(7) for more information on regular expressions. Isolated regular expressions in a pattern apply to the entire line. Regular expressions may also occur in relational expressions, using the operators ~ and !~. /re/ is a constant regular expression; any string (constant or variable) may be used as a regular expression, except in the position of an isolated regular expression in a pattern. A pattern may consist of two patterns separated by a comma; in this case, the action is performed for all lines from an occurrence of the first pattern through an occurrence of the second. A relational expression is one of the following: expression matchop regular-expression expression relop expression expression in array-name (expr, expr, ...) in array-name where a relop is any of the six relational operators in C, and a matchop is either ~ (matches) or !~ (does not match). A conditional is an arithmetic expression, a relational expression, or a Boolean combination of these. The special patterns BEGIN and END may be used to capture control before the first input line is read and after the last. BEGIN and END do not combine with other patterns. Variable names with special meanings: ARGC Argument count, assignable. ARGV Argument array, assignable; non-null members are taken as filenames. CONVFMT Conversion format when converting numbers (default "%.6g"). ENVIRON Array of environment variables; subscripts are names. FILENAME The name of the current input file. FNR Ordinal number of the current record in the current file. FS Regular expression used to separate fields; also settable by option -F fs. NF Number of fields in the current record. $NF can be used to obtain the value of the last field in the current record. NR Ordinal number of the current record. OFMT Output format for numbers (default "%.6g"). OFS Output field separator (default blank). ORS Output record separator (default newline). RLENGTH The length of the string matched by the match() function. RS Input record separator (default newline). RSTART The starting position of the string matched by the match() function. SUBSEP Separates multiple subscripts (default 034). FUNCTIONS The awk language has a variety of built-in functions: arithmetic, string, input/output, general, and bit-operation. Functions may be defined (at the position of a pattern-action statement) thusly: function foo(a, b, c) { ...; return x } Parameters are passed by value if scalar, and by reference if array name; functions may be called recursively. Parameters are local to the function; all other variables are global. Thus local variables may be created by providing excess parameters in the function definition. Arithmetic Functions atan2(y, x) Return the arctangent of y/x in radians. cos(x) Return the cosine of x, where x is in radians. exp(x) Return the exponential of x. int(x) Return x truncated to an integer value. log(x) Return the natural logarithm of x. rand() Return a random number, n, such that 0≤n<1. sin(x) Return the sine of x, where x is in radians. sqrt(x) Return the square root of x. srand(expr) Sets seed for rand() to expr and returns the previous seed. If expr is omitted, the time of day is used instead. String Functions gsub(r, t, s) The same as sub() except that all occurrences of the regular expression are replaced. gsub() returns the number of replacements. index(s, t) The position in s where the string t occurs, or 0 if it does not. length(s) The length of s taken as a string, or of $0 if no argument is given. match(s, r) The position in s where the regular expression r occurs, or 0 if it does not. The variable RSTART is set to the starting position of the matched string (which is the same as the returned value) or zero if no match is found. The variable RLENGTH is set to the length of the matched string, or -1 if no match is found. split(s, a, fs) Splits the string s into array elements a[1], a[2], ..., a[n] and returns n. The separation is done with the regular expression fs or with the field separator FS if fs is not given. An empty string as field separator splits the string into one array element per character. sprintf(fmt, expr, ...) The string resulting from formatting expr, ... according to the printf(1) format fmt. sub(r, t, s) Substitutes t for the first occurrence of the regular expression r in the string s. If s is not given, $0 is used. An ampersand (‘&’) in t is replaced in string s with regular expression r. A literal ampersand can be specified by preceding it with two backslashes (‘\\’). A literal backslash can be specified by preceding it with another backslash (‘\\’). sub() returns the number of replacements. substr(s, m, n) Return at most the n-character substring of s that begins at position m counted from 1. If n is omitted, or if n specifies more characters than are left in the string, the length of the substring is limited by the length of s. tolower(str) Returns a copy of str with all upper-case characters translated to their corresponding lower-case equivalents. toupper(str) Returns a copy of str with all lower-case characters translated to their corresponding upper-case equivalents. Input/Output and General Functions close(expr) Closes the file or pipe expr. expr should match the string that was used to open the file or pipe. cmd | getline [var] Read a record of input from a stream piped from the output of cmd. If var is omitted, the variables $0 and NF are set. Otherwise var is set. If the stream is not open, it is opened. As long as the stream remains open, subsequent calls will read subsequent records from the stream. The stream remains open until explicitly closed with a call to close(). getline returns 1 for a successful input, 0 for end of file, and -1 for an error. fflush([expr]) Flushes any buffered output for the file or pipe expr, or all open files or pipes if expr is omitted. expr should match the string that was used to open the file or pipe. getline Sets $0 to the next input record from the current input file. This form of getline sets the variables NF, NR, and FNR. getline returns 1 for a successful input, 0 for end of file, and -1 for an error. getline var Sets $0 to variable var. This form of getline sets the variables NR and FNR. getline returns 1 for a successful input, 0 for end of file, and -1 for an error. getline [var]  0 if an error occurs. But note that the exit expression can modify the exit status. EXAMPLES Print lines longer than 72 characters: length($0) > 72 Print first two fields in opposite order: { print $2, $1 } Same, with input fields separated by comma and/or blanks and tabs: BEGIN { FS = ",[ \t]*|[ \t]+" } { print $2, $1 } Add up first column, print sum and average: { s += $1 } END { print "sum is", s, " average is", s/NR } Print all lines between start/stop pairs: /start/, /stop/ Simulate echo(1): BEGIN { # Simulate echo(1) for (i = 1; i < ARGC; i++) printf "%s ", ARGV[i] printf "\n" exit } Print an error message to standard error: { print "error!" > "/dev/stderr" } SEE ALSO cut(1), lex(1), printf(1), sed(1), re_format(7) A. V. Aho, B. W. Kernighan, and P. J. Weinberger, The AWK Programming Language, Addison-Wesley, 1988, ISBN 0-201-07981-X. STANDARDS The addr2line utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification, except addr2line does not support {n,m} pattern matching. The flags -d, -safe, and -version as well as the commands fflush, compl, and, or, xor, lshift, rshift, are extensions to that specification. HISTORY An addr2line utility appeared in Version 7 AT&T UNIX. BUGS There are no explicit conversions between numbers and strings. To force an expression to be treated as a number add 0 to it; to force it to be treated as a string concatenate "" to it. The scope rules for variables in functions are a botch; the syntax is worse. FreeBSD 13.2-RELEASE-p3 June 6, 2020 FreeBSD 13.2-RELEASE-p3